-
Notifications
You must be signed in to change notification settings - Fork 68
Enable path mappings for remote debugging #308
Enable path mappings for remote debugging #308
Conversation
Codecov Report
@@ Coverage Diff @@
## master #308 +/- ##
==========================================
+ Coverage 62.66% 63.95% +1.28%
==========================================
Files 11 14 +3
Lines 1875 2000 +125
==========================================
+ Hits 1175 1279 +104
- Misses 700 721 +21
Continue to review full report at Codecov.
|
This should work for VS as well. No need to be VSC specific. @int19h Do you think VS will need something different? |
ptvsd/wrapper.py
Outdated
@@ -930,10 +931,22 @@ def _parse_debug_options(self, debug_options): | |||
options[key] = DEBUG_OPTIONS_PARSER[key](value) | |||
return options | |||
|
|||
def _initialize_vsc_path_maps(self, args): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets make this generic, since this will work for VS as well.
ptvsd/wrapper.py
Outdated
@@ -930,10 +931,22 @@ def _parse_debug_options(self, debug_options): | |||
options[key] = DEBUG_OPTIONS_PARSER[key](value) | |||
return options | |||
|
|||
def _initialize_vsc_path_maps(self, args): | |||
pathMaps = [] | |||
for pathMapping in args.get('pathMappings', []): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have a readme.md describing these custom message items for clarity.
@karthiknadig Please review the updates to the readme.md |
One general catch wrt this PR is that any change to pydevd stuff has to be in its own separate commit (so that we can easily upstream the subtree). |
Aah yes, forgot about that. Will Fix that. |
@int19h |
Can you rebase and squish it to make sure that all commits are separate? I'm not sure if subtree merge is going to complain about a reverted commit... but if it applies them one by one, it probably will. |
@int19h |
It should, I just wanted to make sure that's what actually happens (since it'll commit immediately after). But I guess we can always remove those commits if it goes wrong. |
Fixes #241
Unfortunately I've had to modify a PyDev (If someone can think of a way around this I'm all ears).
The problem is when we initialize the path mappings, the attribute
norm_file_to_client
points to a different function, however its too late as pydev has already imported it usingfrom import