Skip to content
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

Breakpoints in files without a sourcemap don't get hit if executed early #79

Closed
connor4312 opened this issue Nov 7, 2019 · 3 comments
Closed
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@connor4312
Copy link
Member

#78

@connor4312 connor4312 changed the title Breakpoints set before launch on HTML files don't get it Breakpoints set before launch on HTML files don't get hit Nov 12, 2019
@connor4312 connor4312 changed the title Breakpoints set before launch on HTML files don't get hit Breakpoints in files without a sourcemap don't get hit if executed early Nov 18, 2019
@connor4312 connor4312 added the bug Issue identified by VS Code Team member as probable bug label Nov 18, 2019
@connor4312
Copy link
Member Author

Seems to be a thing that happens on all non-sourcemapped scripts. You can try this by setting a breakpoint on a script file containing only const x = 2 + 2. About half the time for me, the script will run without hitting the breakpoint.

On sourcemap scripts we have the debugging pause to load maps and then set breakpoint before continuing, but there's no such pause on other scripts. It looks like a simple race condition.

@roblourens
Copy link
Member

In v1 if your breakpoint is in a .js file, we try to set a breakpoint by url for that filename. This is what I call "optimistic breakpoints" and there is a setting to disable it, as a hack for cases where it causes issues.

If that doesn't work, then in chrome, you can reload the page...

@roblourens
Copy link
Member

We already already doing this:

we try to set a breakpoint by url for that filename

I suspect we just would need to wait for the 'configurationDone' event before calling runIfWaitingForDebugger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

No branches or pull requests

2 participants