-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
Debugger isn't showing TypeScript source #2544
Comments
@SetTrend Thanks for providing the sample repository. I tried this with VS Code 0.10.6 on Windows 10 and I don't see a VS Code problem here. The debugger stops in the *.js file because the source map does not have a mapping for the first line ("use strict"). If you perform one step, the debugger will hit the first line in the TypeScript file just fine. The VS Code strategy for dealing with missing mappings is to show the "truth" (i.e. the *.js file) and not "invent" a bogus location in the TypeScript source. BTW, this source map visualisation shows the missing mapping: |
@weinand : Thank you very much for taking the time to shed light on my problem and solving it! 👏 😄 |
I'm glad that I was able to shed some light on this (and that I do not have to fix a bug here 😎) |
😸 Well, if I may still add a humble wish: I now am aware of this behaviour. But other users may not be. And I may be confused myself again when the mapped source won't be displayed after stepping over a number of lines (which is a use case that may occur). If I'm not wrong then it is still not possible to distinguish between an incorrect mapping file / mapping source file location and a situation when a mapping is not available for a certain code point. I believe it would be helpful if there was some minor visual cue provided by Code (e.g. a short message in the status bar) when hitting such break point, informing the user that everything in regard to mapping file locations is alright, there's just no mapping for the current position and the original source is used for the current breakpoint. E.g. |
Valid request, but this will require a protocol addition and we will have to spend some design cycles on this... or in the editor header: @isidorn what do you think? |
@weinand maybe instead decorate the file name in the callstack in gray / red and on hover show the info that the mapping is missing. |
In a TypeScript project the VS Code debugger displays the generated JavaScript code instead of the TypeScript code:
What's wrong?
Shouldn't the IDE better emit a warning when it can't find the corresponding map referenced in a file and provide a list of locations to the user listing where it's unsuccessfully been searching for the original source?
See this sample repository for a reference: SetTrend/TS18N.
The text was updated successfully, but these errors were encountered: