DebuggingTools extension documentation describes how to attach a debugger to a running Slicer application instance. In this case, you don’t run a script but you put breakpoint(s) into the code and execution is paused when that line is reached. A that point you can open the console, step through the code, and run commands there.
If you want to run script in Slicer’s Python environment then I would recommend to use Jupyter notebooks, using SlicerJupyter extension.
You may be able to execute some simplified scripts in Slicer’s Python environment, without starting the application, but this would be limited to using libraries, such as MRML, vtkITK, and vtkSegmentationCore, and some module logics. It might be interesting to see how Slicer can be used like this (essentially, as a set of Python libraries), but since attaching a debugger and using Jupyter notebooks seems to cover needs of most people, we don’t have plans to work on this in the near future.