microsoft / vscode-js-debug

A DAP-compatible JavaScript debugger. Used in VS Code, VS, + more
MIT License
1.67k stars 282 forks source link

Extension does not parse resolveSourceMapLocations regex correctly #1944

Closed antoniozh closed 7 months ago

antoniozh commented 9 months ago

Describe the bug In my launch.json, I included every source map file with the following regular expression: "${workspaceFolder}/**" This should include everything. However, a few days ago my breakpoints were not bound correctly. After some troubleshooting, I found that manually adding the directory containing the source map files to the resolveSourceMapLocations field fixes my issue again. I therefore suspect that the first regular expression did not work despite matching everything.

To Reproduce Steps to reproduce the behavior:

  1. Clone this example repository
  2. Compile and run the debugger with a breakpoint set in main.ts
  3. Check if the breakpoint is set correctly and then add "${workspaceFolder}/build/*.map" to the resolveSourceMapLocations field.
  4. Check the breakpoint again

VS Code Version: 1.86.2 Extension version: v1.86.1

Additional context Add any other context about the problem here.

connor4312 commented 8 months ago

This works for me using your repo -- if it's still an issue, can you please collect a log file using the instructions in the issue template:

If you're able to, add "trace": true to your launch.json and reproduce the issue. The location of the log file on your disk will be written to the Debug Console. Share that with us.

⚠️ This log file will not contain source code, but will contain file paths. You can drop it into https://microsoft.github.io/vscode-pwa-analyzer/index.html to see what it contains. If you'd rather not share the log publicly, you can email it to connor@xbox.com

antoniozh commented 8 months ago

Hello, I just sent you a mail, thank you!

connor4312 commented 7 months ago

Thanks, should be fixed in the next nightly build https://github.com/microsoft/vscode-js-debug#nightly-extension

eleanorjboyd commented 7 months ago

Hello @antoniozh, are you able to verify if this fix on vscode insiders has resolved your problem?

antoniozh commented 7 months ago

I will report back once I install vscode insiders

connor4312 commented 7 months ago

Please use the nightly build, which works on either stable or Insiders: https://github.com/microsoft/vscode-js-debug#nightly-extension

antoniozh commented 7 months ago

Good morning, the nightly works for me and the stable version is still broken, so I'm assuming you fixed my issue. Thank you!