You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously I have been able to run my code in the terminal in pieces, by highlighting bits of code and pressing Shift+Enter. This is really useful for error handling, testing and holding variables in an accessible memory. However, coworkers are now running into an issue where we cannot call Run Selection In Terminal, as this option appears to have been replaced by the Run Selection In REPL command. This is a much clunkier user interface, opening on the right side of the screen instead of the bottom which blocks vision of the code and makes it much harder to use. To add to this, the REPL doesn't recognise the current working directory, and this needs to be manually set which is a pain when someone is setting up multiple directories.
I have tried to remap the keybindings for Run Selection In Terminal but nothing happens when I press them; similarly I cannot remap the keybindings of Run Selection In REPL as they don't seem to exist. Any help reverting the changes back to what they used to be is really appreciated.
How it used to look:
How it now looks (notice how I need to set the working directory manually here as well or the code will not run):
If this is not a bug, could it please be made clearer for users how to change this option? I have looked everywhere I can think of.
Thanks!
Steps to reproduce:
Highlight code, right click, go to Python, the option is Run Selection In REPL and not Run Selection In Terminal.
VS Code version: Code 1.94.2 (384ff7382de624fb94dbaf6da11977bba1ecd427, 2024-10-09T16:08:44.566Z)
OS version: Windows_NT arm64 10.0.26100
Modes:
System Info
Item
Value
CPUs
Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) CPU (12 x 2976)
Hello @adamrickayzenanvil Thanks for filing this issue and thoroughly explaining this.
The new editor REPL that you see is called Native REPL (experimental feature) which you can turn it off via setting:
With the new Native REPL you may also get features that should help you test/run your blocks of code with Intellisense, syntax highlighting, etc..
You may also drag this down to the bottom if you strongly prefer REPL being in the "usual" bottom location as well.
As far as current directories go, we set it to the highest "workspace directory" and you should be seeing option to select your cwd if you have multiple VS Code workspace defined in your project. Reference: https://code.visualstudio.com/docs/editor/multi-root-workspaces
Would love to hear what you think and let me know how things go. Thanks
Hi @anthonykim1. Many thanks for the advice, this fixed my issue.
My honest opinion (and that of my team) is that this is a very unclear and detrimental change. It was extremely difficult for me to find the solution to this, and it's really not ideal for our workflow to have changes like this made without it being clear how to reverse them. Running the code to the REPL is very similar to running it in an interactive window, so it is not clear to us why the running to terminal command (which provides different functionality) is superseded by the new REPL option. There may be some situations where someone would want to use the new command but I think it needs to be clearer to the user that they can change it if needed.
As a note, both me and a coworker had issues with the current working directory which felt like a bug. We are used to opening a workspace and having the cwd update automatically so you can run lines like 'from core.imports import *', but with the new REPL method the cwd was set to C:\Users\Name, which caused issues. After reverting the changes following your advice this issue disappeared so it definitely seemed linked to the REPL.
Type: Bug
Behaviour
Previously I have been able to run my code in the terminal in pieces, by highlighting bits of code and pressing Shift+Enter. This is really useful for error handling, testing and holding variables in an accessible memory. However, coworkers are now running into an issue where we cannot call Run Selection In Terminal, as this option appears to have been replaced by the Run Selection In REPL command. This is a much clunkier user interface, opening on the right side of the screen instead of the bottom which blocks vision of the code and makes it much harder to use. To add to this, the REPL doesn't recognise the current working directory, and this needs to be manually set which is a pain when someone is setting up multiple directories.
I have tried to remap the keybindings for Run Selection In Terminal but nothing happens when I press them; similarly I cannot remap the keybindings of Run Selection In REPL as they don't seem to exist. Any help reverting the changes back to what they used to be is really appreciated.
How it used to look:
How it now looks (notice how I need to set the working directory manually here as well or the code will not run):
If this is not a bug, could it please be made clearer for users how to change this option? I have looked everywhere I can think of.
Thanks!
Steps to reproduce:
Highlight code, right click, go to Python, the option is Run Selection In REPL and not Run Selection In Terminal.
VS Code version: Code 1.94.2 (384ff7382de624fb94dbaf6da11977bba1ecd427, 2024-10-09T16:08:44.566Z)
OS version: Windows_NT arm64 10.0.26100
Modes:
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Extensions (9)
A/B Experiments
The text was updated successfully, but these errors were encountered: