Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Add support for remote source references #321

Merged
merged 6 commits into from
Apr 6, 2018

Conversation

DonJayamanne
Copy link
Contributor

Fixes #318
This is an opt in feature.
We'll be enabling this as a default feature in VSC.

  • If users provide source mappings then, that wins over source references.
  • If users do not provide source mappings, then source references are used
  • If user provides source mappings, but PTVSD is unable to map the files (e.g. standard lib code), then source references are used

@DonJayamanne DonJayamanne requested a review from int19h April 6, 2018 18:30
@codecov-io
Copy link

codecov-io commented Apr 6, 2018

Codecov Report

Merging #321 into master will decrease coverage by 0.63%.
The diff coverage is 14.28%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #321      +/-   ##
==========================================
- Coverage    63.1%   62.46%   -0.64%     
==========================================
  Files          14       14              
  Lines        2030     2057      +27     
==========================================
+ Hits         1281     1285       +4     
- Misses        749      772      +23
Impacted Files Coverage Δ
ptvsd/wrapper.py 48.26% <14.28%> (-0.92%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b891b9c...c1e2925. Read the comment docs.

README.md Outdated
@@ -44,6 +44,7 @@ contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additio
"Jinja", // Enables Jinja (Flask) Template debugging
"FixFilePathCase", // See FIX_FILE_PATH_CASE in wrapper.py
"DebugStdLib" // Whether to enable debugging of standard library functions
"UseSourceReferences" // Whether to use source references (making `pathMappings` optional)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any particular scenario that you have in mind when the user might want to not specify this? In VS, at least, all debuggers that support this functionality (e.g. JS), do so unconditionally.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't think of any reason, which is why I was planning on making this the default in VSC.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will remove this.

ptvsd/wrapper.py Outdated
And we know that the path returned is the same as the server path
(i.e. path has not been translated)"""

if self.start_reason == 'launch' or \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it's worth disabling it for launch, given that "remote" attach can also be local - and often is in practice (e.g. for most people using our debugger with embedded Python scripting). It looks like the code below would take care of things either way?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, but I'm not following you here.

@DonJayamanne DonJayamanne merged commit 39dfffe into microsoft:master Apr 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants