Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Show native code if source not available #23

Closed
jamietre opened this issue Dec 10, 2015 · 8 comments · May be fixed by zhouyoufu/vscode-node-debug#5
Closed

Show native code if source not available #23

jamietre opened this issue Dec 10, 2015 · 8 comments · May be fixed by zhouyoufu/vscode-node-debug#5
Assignees
Labels
Milestone

Comments

@jamietre
Copy link

If a source map is not resolved correctly for a given file when debugging node, VSCode shows "Source is not available."

Is it possible to just show the actual code being executed in these situations?

@weinand
Copy link
Contributor

weinand commented Feb 9, 2016

@jamietre this has been fixed in VS Code 0.10.8 (January release).

@jamietre
Copy link
Author

jamietre commented Feb 9, 2016

I had noticed 👍

I am unfortunately not able to get source maps to work at all any more again (I believe as of the January release). One of the consequences of this new feature, unfortunately, is that it makes it harder to determine the cause when source maps aren't working, since I don't know if they are not working because the source can't be located, or there's some other issue with the source map, or vscode just isn't trying to use a source map for some reason, perhaps config related.

Not sure if this is related. I made a feature request to support source maps with inline source code, as there seem to be many challanges in supporting source maps with external source code, with either vscode, or tooling support for generating the correct source map structures, or both.

@jamietre
Copy link
Author

jamietre commented Feb 9, 2016

I just saw update to 10.8, HUGE THANKS for moving the console window to the bottom! Amazing improvement!

Also I think I understand what has happened with source maps. I am not sure if this was the case just for the previous release, or if it's different now.

  • When using a debugger statement, vs code shows the compiled code.
  • When using a breakpoint, vs code shows the source code

In the prior release, breakpoints weren't actually working (at least for me) so I had been using debugger and it didn't occur to me this could be related.

In the version just released, breakpoints are working, and the source code is correctly shown when I use breakpoints in the source, but the compiled code is shown when it breaks on a debugger statement.

@weinand
Copy link
Contributor

weinand commented Feb 9, 2016

@jamietre breaking on a debugger statement should not behave differently than breaking on a breakpoint. If it does then please file a bug.

@jamietre
Copy link
Author

jamietre commented Feb 9, 2016

Will do.

@jamietre
Copy link
Author

jamietre commented Mar 4, 2016

.. @weinand I am experiencing the problem of "debugger" statements showing the compiled code rather than the source frequently, but it's not consistent. That is, a given "debugger" statement will always show either the correct or incorrect file, but I can't figure out why it happens in some files and not in others. When I created a trivial app to try to reproduce it, I can't. So it must have something specifically to do with the structure of the files in the app I'm working with.

I wanted to just check to be sure I'm still the only one experiencing this before I spend a lot of time trying to create a standalone app that can repro it.

@weinand
Copy link
Contributor

weinand commented Mar 4, 2016

@jamietre which version of VS Code are you using?

@jamietre
Copy link
Author

jamietre commented Mar 4, 2016

0.10.8

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants