Integrating VS Code with GHPython

Hi. is there any good way to write some scripts in Python and execute them outside grasshopper? Like a remote terminal window that runs the script?
Grasshopper is very slow, and it crashes a lot. I want to connect my GHPython component to an outside python runtime. Is it possible?