Most of the time, my workflow is something like
- Write module
- Write script calling functions in module
- Run script and get an error in a function in the module
- Fix error
- Repeat steps 3-4 forever
The problem is that after fixing the function error, every single time I have to click back to my script and run it. Because of the way VS Code opens tabs, it never stays put where I expect it, and even if it did, inevitably there’s a new error in the same function I was just in, so I end up having to click back and forth.
What I’d like to be able to do is to designate a script as my “build target” and then have a global keyboard shortcut that runs that file (i.e. “Execute file in REPL” but a pre-specified file, not an active file). That way when I fix the function, I could stay in that file, smash some shortcut, and have my script run, and then already be in the right file to fix the next error.
I don’t mind too much going into the settings and manually editing the path target file every once in a while, but it’d be nicer if there were also a shortcut that did “Designate this file as the build target.”
How would I do this?
(I’m also open to completely new workflow suggestions)