microsoft / vscode-js-debug

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

Breakpoints not working on new vs code version (1.86) #1938

Closed AmitAkuka closed 9 months ago

AmitAkuka commented 9 months ago

Describe the bug A clear and concise description of what the bug is. After updating to 1.86 from 1.85 the breakpoint's doesn't seem to work, giving me the below error: Unbound breakpoint Some of your breakpoints could not be set. If you're having an issue, you can [troubleshoot your launch configuration] Nothing has changed (same launch.json file and no major changes or anything that can impact the breakpoints behavior was done). Also tried on different PC, version 1.85 is working, as soon as I updated to 1.86 it broke again - same error. In the patch notes of 1.86 I noticed some changes made to breakpoint.

To Reproduce Steps to reproduce the behavior:

  1. Set up your launch.json
  2. Attach the debugger to your folder running a node server.
  3. Try to add a break point to one of the files inside the debugged folder.
  4. Repeat using 1.85 vs studio code and 1.86 versions.

VS Code Version: 1.86 Our launch.json: launch.json Node version: 18

connor4312 commented 9 months ago

Please collect logs using the instructions found in the issue template. Thanks!

AmitAkuka commented 9 months ago

Please collect logs using the instructions found in the issue template. Thanks! Hi, Let me know if you need more information, thank you. vscode-debugadapter-4d98f0bb.json vscode-debugadapter-4d98f0bb 2.json

connor4312 commented 9 months ago

Thanks, can you please try modifying your outFiles to also include your src directory?

We previously ignored the launch config's instructions regarding locations where sourcemaps could be resolved in remote cases, but we now take them into account (https://github.com/microsoft/vscode-js-debug/pull/1921). It looks like you're using a loader that causes the sources to be transformed in-place within your src folder, and since outFiles only includes your dist folder these aren't getting resolved.

AmitAkuka commented 9 months ago

Thanks, can you please try modifying your outFiles to also include your src directory?

We previously ignored the launch config's instructions regarding locations where sourcemaps could be resolved in remote cases, but we now take them into account (#1921). It looks like you're using a loader that causes the sources to be transformed in-place within your src folder, and since outFiles only includes your dist folder these aren't getting resolved.

Hi Connor, We managed to fix it by adding "${workspaceFolder}/backend/*/.ts" into the outFiles as you suggested. Thank you for the support!