Allow -P to work for debugpy #1759
Replies: 6 comments
-
@karthiknadig isn't this handled by the extension? Those args are passed to python before running debugpy? |
Beta Was this translation helpful? Give feedback.
-
No never mind, they're passed by the launcher. |
Beta Was this translation helpful? Give feedback.
-
That is correct. |
Beta Was this translation helpful? Give feedback.
-
Debugpy is passing that argument to debugpy, but it's not running your code. It's running the debugger: Which likely is not your intent. You want I think this would require a custom way to modify the sys.path before starting the app. Or you could modify your use case to use attach and launch your app with -P. |
Beta Was this translation helpful? Give feedback.
-
Meaning -P is working as expected: Help from python.org for
|
Beta Was this translation helpful? Give feedback.
-
Transferring to a discussion for up votes. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Type: Bug
Behaviour
Expected vs. Actual
Adding the pythonArgs -P or -I to my launch config and call a script in module:
Expected:
Folder of file not in
sys.path
Actual:
Folder of file is in
sys.path
Steps to reproduce:
https://github.com/prumand/vscdoe-pythonargs-not-used
Diagnostic data
python.languageServer
setting: DefaultOutput for
Python
in theOutput
panel (View
→Output
, change the drop-down the upper-right of theOutput
panel toPython
)User Settings
Extension version: 2023.14.0
VS Code version: Code 1.81.1 (Universal) (6c3e3dba23e8fadc360aed75ce363ba185c49794, 2023-08-09T22:20:33.924Z)
OS version: Darwin arm64 22.6.0
Modes:
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
A/B Experiments
Beta Was this translation helpful? Give feedback.
All reactions