question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Source maps and breakpoints read correctly but app hangs and breakpoint is never hit

See original GitHub issue

Describe the bug I’m running Typescript tests using @web/test-runner with esbuild transpiling the typescript on the fly and providing inline source maps.

It’s a bit strange in that the compiled JS is not on disk so we end up with web background.ts mapping to on disk background.ts. Similar set ups have worked in the past so I’m thinking a subtle issue is preventing breakpoints from firing.

(If there are no breakpoints, then the tests run fine and the test which don’t contain a breakpoint will also run fine while the final test hangs until I restart)

The diagnostic tool shows everything as expected except that the top level files seem to be absolute paths printed relative to my workspace directory. I assume that’s a diagnostic tool only bug since the detailed paths are exactly right.

image

I’m hoping the log files make the problem obvious but I can push a branch to my repo for easy debugging if needed later.

Log File vscode-debugadapter-be9fedb0.json.gz

VS Code Version:

バージョン: 1.63.2 (system setup) コミット: 899d46d82c4c95423fb7e10e68eba52050e30ba3 日付: 2021-12-15T09:40:02.816Z Electron: 13.5.2 Chromium: 91.0.4472.164 Node.js: 14.16.0 V8: 9.1.269.39-electron.0 OS: Windows_NT x64 10.0.19043

Additional context I’m running remote WSL with debian based linux though it’s probably not related.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
connor4312commented, Jan 4, 2022

Sure, you can use any old version of the nightly build

0reactions
melink14commented, Feb 23, 2022

I got caught up in work but came back to this recently. I’ll continue recording my progress here for future readers. To reduce variables I removed the realtime transpilation and ran my tests pre-compiled.

I noticed first that, if sourcemaps were off then there was no crash. Then I tried to figure out which source maps caused it by looking at all my deps.

I found that in order for it to not crash in this case, I had to remove the inline sourcemaps of two of my sourcefiles. It has to be both, if i just remove one or the other, the crash still occurs. The odd part is that the breakpoint is not related to these files and so even though the files are loaded via imports analyzing the sourcemaps would not be needed for placing a breakpoint.

Even though the crash is in chrome, I wonder if it could be caused by a malformed command due to an improperly read sourcemap…

Read more comments on GitHub >

github_iconTop Results From Across the Web

VS Code: "Breakpoint ignored because generated code not ...
I solved my problem by changing .vscode/launch.json so that "sourceMaps": true attribute under the Launch configuration was set (it starts ...
Read more >
Xcode 13: Active breakpoint turns to an outline when app is run.
Using Xcode 13.1, I set a breakpoint, which correctly appears as the blue marker in the left-hand column of the editor. When I...
Read more >
Issue 459499: Chrome failing to stop at breakpoints ... - Monorail
I feel like almost every breakpoint I set doesn't get properly stopped at. ... Both sourceMaps map the code in a file with...
Read more >
Troubleshoot Breakpoints in the Visual Studio Debugger
If you're debugging optimized code, make sure the function where your breakpoint is set isn't being inlined into another function. The Debugger.
Read more >
Troubleshooting common PHP debugging issues | PhpStorm ...
When breakpoints are not being hit but the debugger seems to connect, ... Xdebug ignores a breakpoint and stops at a line where...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found