when
expression for command Python: Run Selection/Line in Python REPL contains config.python.REPL.sendToNativeREPL
which should not be there
#23733
Labels
Type: Bug
This is my default
when
expressionconfig.python.REPL.sendToNativeREPL && editorTextFocus && !jupyter.ownsSelection && !notebookEditorFocused && editorLangId == 'python' && activeEditor != 'workbench.editor.interactive'
My issue is with
config.python.REPL.sendToNativeREPL
By default it is false. How would users know that shift+enter for
Python: Run Selection/Line in Python REPL
requires that setting to be checked without knowledge of investigatingwhen
expression?Another inconsistency is all smart send demos i see online are sending to the terminal. To reproduce that, i had to delete
config.python.REPL.sendToNativeREPL &&
from the when expression, or else it will try to send to the Python REPL and break in 2 ways.Firstly, it is not sending to terminal like demos but to Python REPL
Secondly, it is not printing the full string
I am testing smartsend using multiline string below. If smart send works, i can place my cursor on both 1st and 2nd line of string and it should print properly. This only worked when I delete
config.python.REPL.sendToNativeREPL
from the when expression, AND uncheck Python: REPL: Send to Native REPL.Is this expected behavior of smart send?
If i place the cursor on return line and do shift+enter i get
SyntaxError: 'return' outside function
. I expected it to work.If i place the cursor on def add line, it does load the function properly.
In both cases the cursor will jump to the next code section so that's good.
Summary
To summarize, i'm asking whether
config.python.REPL.sendToNativeREPL
should by default not be added to the when expression?If it should be there, why the inconsistency with demos showing smart send outputting to terminal while this default setting is outputting to Python REPL and doesn't print the whole multiline string which smart send should do.
Extension version: 2024.8.1
VS Code version: Code 1.90.2 (5437499feb04f7a586f677b155b039bc2b3669eb, 2024-06-18T22:34:26.404Z)
OS version: Windows_NT x64 10.0.22631
Modes:
Remote OS version: Linux x64 5.15.153.1-microsoft-standard-WSL2
python.languageServer
setting: DefaultUser Settings
Installed Extensions
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
A/B Experiments
The text was updated successfully, but these errors were encountered: