Remote debug (PTVSD) path mapping
See original GitHub issueIssue Type: Bug
I simply launch my script on the target device :
sudo python3 -m ptvsd --host 0.0.0.0 --port 5678 --wait script.py
and when I launch the debugger on VSCode, I get this on the console of the remote device :
pydev debugger: warning: trying to add breakpoint to file that does not exist: /home/nvidia/c:/Users/omartin/OneDrive/Professionnel/Dev...
regarless of what the path mapping is (I’ve tried this :
"pathMappings": [ { "localRoot": "${workspaceFolder}", "remoteRoot": "/home/bob/" } ],
and it won’t match go to /home/bob at all. Looks like something changed on the vscode side (python version, I’ve gone up to 2018.12 this morning and back to 2018.11 to test if that would be the cause (this all worked very well until this morning). This didn’t solve the issue. Also vscode itself was updated but I’m not sure this has anything to do with this but clearly, something has changed…
Extension version: 2018.11.0 VS Code version: Code 1.30.0 (c6e592b2b5770e40a98cb9c2715a8ef89aec3d74, 2018-12-11T22:29:11.253Z) OS version: Windows_NT x64 10.0.17763
System Info
Item | Value |
---|---|
CPUs | Intel® Core™ i7-8650U CPU @ 1.90GHz (8 x 2112) |
GPU Status | 2d_canvas: enabled checker_imaging: disabled_off flash_3d: enabled flash_stage3d: enabled flash_stage3d_baseline: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on native_gpu_memory_buffers: disabled_software rasterization: enabled video_decode: enabled video_encode: enabled webgl: enabled webgl2: enabled |
Memory (System) | 15.93GB (7.42GB free) |
Process Argv | |
Screen Reader | no |
VM | 0% |
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:13 (1 by maintainers)
Top GitHub Comments
I am facing the same issue. In my case the remote code is inside a Docker container. It seems that the
remoteRoot
is being prepended to thelocalRoot
. Like @omartin2010 mentioned, things were working fine up until recently. My configuration worked 2 months ago. I downgraded the extension to version 2018.10.0, I downgradedptvsd
to version 4.13.0. Still no luck. May be the issue lies with VS Code itself? The workaround works for me as well. But just like others have pointed out, the workaround only works when the drive letter is in lower case.Note: Seems like the issue is Windows only. Things worked as expected on my Kubuntu machine.
Having the same issue, and the workaround of replacing
"localRoot": "${workspaceFolder}"
with"localRoot": "c:\\path\\to\\my\\workspace\\folder"
(lowercase drive letter) also works for me. I recall reading other issue threads that also had to do with the casing of the drive letter, I don’t remember if they were in the VSCode repo itself, or for the Python Extension, but hopefully this is just a matter of getting in line with whatever the convention is?For the record: VS Code 1.30.0 Python extension 2018.12.1