-
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
Using "request": "launch" item in launch.json for debugging does not send pathMappings #3568
Comments
Reopening, as this relates to remote debugging. |
After some very helpful descriptions from @karthiknadig I was able to understand what the issue is here. We send the following for "pathMappings": [
{
"localRoot": "<local>",
"remoteRoot": "<remote>"
}
] This is a bit counter-intuitive perhaps that we would need to send these mappings, but this is a scenario that does indeed call for it. Probably all that is needed is to add the same logic from this.sendTelemetry('launch', debugConfiguration); with: if (!debugConfiguration.pathMappings) {
debugConfiguration.pathMappings = [];
}
// This is for backwards compatibility.
if (debugConfiguration.localRoot && debugConfiguration.remoteRoot) {
debugConfiguration.pathMappings!.push({
localRoot: debugConfiguration.localRoot,
remoteRoot: debugConfiguration.remoteRoot
});
}
this.sendTelemetry('launch', debugConfiguration); (or some better-shared manner of doing so between |
@karthiknadig Please could you advice what needs to be passed to PTVSD to get this issue resolved. |
Prescribed Solution
"pathMappings":[
{
"localRoot": "<current-working-directory>", // full path to current working directory
"remoteRoot": "."
}
] |
To verify:
For each of the above, verify that multi-proc debugging works. |
@DonJayamanne, you suggested that #5852 had been reverted, but I don't see that anywhere. |
merged: #7024 |
✅ Validated |
@gigi206 commented on Mon Oct 29 2018
Environment data
Issue
I use VSCode with extension ms-python.python-2018.9.1 and I use python under msys2 (cygwin like) :
When I try to debug a python file I have the following message :
From pydevd_file_utils.py file, if I replace L231 by the following line, it works :
https://github.com/Microsoft/ptvsd/blob/66d75d8c87c848d0f7b60102ac6a2a134c34eae4/ptvsd/_vendored/pydevd/pydevd_file_utils.py#L231
I opened this issue (fabioz/PyDev.Debugger#125) but it seems that it should open here...
Is it possible to add a test to determine the path under cygwin / msys2 ?
@karthiknadig commented on Thu Nov 01 2018
Can you give the launch configuration you are using for this?
@gigi206 commented on Fri Nov 02 2018
I use the default configuration :
When I select Python: Current File (Integrated Terminal) and I start the debug, it works but I have the following message :
If I use the following Python code :
I start my python program and my program pause and listen to port 5678 :
When I click on Python: Attach, my program finish with the following message :
If I replace the line 231 like explain above, it works.
@fabioz commented on Fri Nov 02 2018
@karthiknadig this is actually a feature request (support cygwin in the debugger) -- the first fix needed is dealing with cygpaths as @gigi206 pointed, but there may be more to it (as a note, when/if cygwin support is added, we should also make sure there's a worker to test it in the ci).
@karthiknadig commented on Fri Nov 02 2018
I see. It might be worth a shot to try 'Attach' with
pathMappings
.@gigi206 Add the following to your launch configuration. You may have to tweak the paths for this to work:
@gigi206 commented on Fri Nov 02 2018
I have modified my launch.json file to :
It seems to work with attach request type but pathMappings seems not be allowed with launch request type.
I have the message pydev debugger: warning: trying to add breakpoint to file that does not exist: /:\Users\gigi\Desktop\python\gigix.py (will have no effect) with launch request type but it works.
@karthiknadig commented on Fri Nov 02 2018
@DonJayamanne Does 'launch' support
pathMappings
? On the debugger side we handlepathMappings
for both launch and attach.@karthiknadig commented on Wed Dec 05 2018
Issue moved to Microsoft/vscode-python #3567 via ZenHub
The text was updated successfully, but these errors were encountered: