-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Source location hover in CALLSTACK view shows bogus path for internal modules #16913
Comments
@weinand so how do you propose that this magic word is contributed to vscode? Should it come from the source response? |
@isidorn the frontend should not have to know anything about this case. So the 'magic word' would be introduced by the backend (debug adapter) and for the debugger UI it would just appear as a regular path segment. |
@weinand the frontend currently simply takes the fs path for each uri in the callstack. For internal modules this uri is fake and looks something like 'debug://internal/1056/module.js' so the fs path is 1056/module.js, namely the reference and the name. Instead of using a fsPath for internal modules the frontend could use anything coming from the adapter. Should we add something to the protocol or is there already something we can use? |
It seems like the UI should only show |
We will continue to show only Instead of doing this we should show something that makes clear that If we do not want to extend the debug protocol, we could manufacture a 'better' fake path that says something like Alternatively we could introduce some optional |
As usual, I prefer the more pragmatic approach, the first one you proposed - manufacture a 'better' fake path. |
|
@isidorn as a first step towards a solution I suggest that we try to remove the path magic in the debugger UI.
@isidorn do you see any issues with this approach? |
@weinand thanks for the suggestion, however there are limitations to what we can customise in how our workbench displays a uri. First thing we need to consider is what internal URI representation does an internal module have. Every resource in the workbench needs to have a unique uri. Once we know that everything flows automtically from there. Currently this uri for internal modules lookes like How we display paths in the call stack view is fully up to us and we can customise that as we think is best. So yes, the hover in the callstack we can use the name if the path is missing In short: all of your suggestions make sense and can be done in the call stack view. |
@isidorn You can continue to use your current URI representation for internal modules (as long as you are not persisting soureReferences across sessions because that would be a violation of the protocol spec). |
@isidorn I've delivered feature #16918 for node-debug. Since this change will return a |
@weinand I tried out your change with my latest changes and it looks good. We need to update the documentation as previously we would "declare" something an internal module if it does not have a |
@isidorn perfect timing! |
@weinand great 😉 |
@isidorn the protocol spec never talked about 'internal modules'. It only alluded that the content of a source is loaded either via a I tried to make this more precise by tweaking the comments for
|
Looks good to me |
The source path starts with the (internal) variable reference used in the debug protocol:
We should find a better path root for this.
Ideally we should use a 'magic world' that could be used in the 'Just my code' feature to filter those modules (see #16918).
But the VS Code frontend should not hardcode this.
The text was updated successfully, but these errors were encountered: