When a workspace/project_folder is not open in VSCode, the [run selection / run section of code] commands error out. Here is a screenshot:
To reproduce:
Start VSCode without a workspace open, i.e. just open a single file, and try to run selection or run code section and move to next, the command in the ipython terminal is executed as "%run -i "undefined" #(Line X0:X1)"
Potential solutions:
Remove dependency to have a workspace open, which would probably entail having a static location for the code.py file, and on that note...
Maybe allow the user to set the location of the code.py file? I feel that the way it works currently you'll end up with a ".vscode" folder in every project you open, which is not ideal. It would be great to expose a feature where the user can pick his own location for code.py, and make it default to store it under ~/.vscode/... or any other static location that makes sense if the user chooses not to override the filepath. I don't see any real reason for a user to open the code.py for inspection, it's simply a file to store the intermediate code before sending to IPython.
When a workspace/project_folder is not open in VSCode, the [run selection / run section of code] commands error out. Here is a screenshot:
To reproduce: Start VSCode without a workspace open, i.e. just open a single file, and try to run selection or run code section and move to next, the command in the ipython terminal is executed as "%run -i "undefined" #(Line X0:X1)"
Potential solutions: Remove dependency to have a workspace open, which would probably entail having a static location for the code.py file, and on that note... Maybe allow the user to set the location of the code.py file? I feel that the way it works currently you'll end up with a ".vscode" folder in every project you open, which is not ideal. It would be great to expose a feature where the user can pick his own location for code.py, and make it default to store it under ~/.vscode/... or any other static location that makes sense if the user chooses not to override the filepath. I don't see any real reason for a user to open the code.py for inspection, it's simply a file to store the intermediate code before sending to IPython.