-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Running a file in WSL executes ^C(keyboardInterrupt) before running #24674
Comments
Hi! Can you give more details about how you run this script? Like what button you are using / flow to run it? Thanks |
I am using 'run python file' from the run button. This is provided by the Python extension. |
Thanks for filing this. This would get resolved once I merge #24555 again. Will leave this open. |
…24765) Resolves: #24674 (comment) Use sendText to send Python code to Terminal REPL for Python >= 3.13 to prevent keyboard interrupt. Relevant file context from VS Code: https://github.com/microsoft/vscode/blob/f9c927cf7a29a59b896b6cdac2d8b5d2d43afea5/src/vs/workbench/contrib/terminal/browser/terminalInstance.ts#L906 It seems like we are on this edge scenario where generic terminal shell integration is enabled (so executeCommand can be used), but we have temporarily disabled Python shell integration for Python >= 3.13 (and of course sending the relevant escape sequences such as the commandLine itself to VS Code). Why? * python/cpython#126131 placing user's mouse cursor position at odd place. Why and where I think the keyboard interrupt is happening: Python extension tries to executeCommand when sending commands to terminal REPL >= Python3.13, where we are not sending shell integration escape sequences from the Python side. * I think this is why it is attaching the keyboard interrupt all the sudden, because VS Code see that Python extension is requesting executeCommand but is not sending the commandLine escape sequence to them. For every other versions < 3.13 (where we send all the shell integration escape sequences including the commandLine), this does not happen.
Verification steps:
|
I thought you would like to know, this fixes the same issue on MacOS too. |
Yeap! @AWH1122 is correct. This was resolved for MacOS earlier as well :) |
Type: Bug
Behaviour
Running a script in WSL always has a ^C before it. This causes the terminal to become cluttered.
Steps to reproduce:
Diagnostic data
Output for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)Extension version: 2024.22.1
VS Code version: Code 1.96.2 (fabdb6a30b49f79a7aba0f2ad9df9b399473380f, 2024-12-19T10:22:47.216Z)
OS version: Windows_NT x64 10.0.22631
Modes:
Remote OS version: Linux x64 5.15.167.4-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
webnn: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: