-
Notifications
You must be signed in to change notification settings - Fork 281
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
feat: add pathMapping to node.js #1015
base: main
Are you sure you want to change the base?
Conversation
@connor4312 I am not sure why the windows failure. do you have any pointers? |
Thanks for the PR! I pushed some small tidying. I think there's two more things we may want to do:
|
Thanks for looking into this. For the exists check, I was thinking that if user maps a path by npm scope only, then some package may not have an original local copy, so checking if it exist first would help. For performance, since the check only occurs if a path maps, it should be limited in scope. Please let me know what you think. I will look into #1. Thanks. |
I looked into the code regarding 1 and 2. Some thoughts and questions:
|
Hi, sorry for the late response.
|
thanks. for 2, the case I was thinking is, user could be mapping |
@connor4312 I think I may have mistaken this to be working. I tried it again, while the pathMapping code is properly returning the mapped path, vscode is not opening the mapped file. My guess is that the breakpoint predictor also needs to know about the pathMapping? It currently search all workspace for sourceMapURL and process them, so something similar also has to be done for pathMapping? Could you give me some ideas please? Thanks. |
please review. thank you for your time and consideration. |
Hi, I started merging this in https://github.com/microsoft/vscode-js-debug/tree/jchip-path-mappings. I don't think we need the changes to the breakpoint predictor and instead manage it by updating |
Hi, thanks for looking into this. I am not sure what to change in |
i did a bit of tracing, here is what I found. I have a test project that maps
Without the changes to handle path mapping in step 3, vscode doesn't know that it needs to setup "mapped breakpoint" for I am not sure how to achieve that in |
Thank you for pointing me to the
pathMapping
option.This PR implements node.js support for the option.
Thank you for your time and consideration.