microsoft / vscode-js-debug

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

Breakpoint is unbound #1158

Closed frisch-raphael closed 2 years ago

frisch-raphael commented 2 years ago

Hi, merry christmas to everyone and thanks for your work. :-) I've been trying to debug from vscode in a quasar/typescript/vue projects, but to no avail. In particular, I can't seem to hit breakpoints in my ts files. It seems I'm missing something obvious, but after skimming through dozing of other issues without making it work, I decided to open my own.

To Reproduce

  1. install the quasar cli
  2. quasar create testapp
  3. cd testapp
  4. quasar dev
  5. open project with vscode
  6. add "source-map" to quasar.conf.js, as per this link
  7. set breakpoint anywhere in ts code
  8. Set launch.json with the following config (also tried with the default generated by vscode, and multiple other variations):
    {
    "type": "chrome",
    "request": "launch",
    "name": "Quasar App: chrome",
    "url": "http://localhost:8080",
    "webRoot": "${workspaceFolder}/src",
    "breakOnLoad": true,
    "sourceMapPathOverrides": {
    "webpack:///./src/*": "${webRoot}/*"
    }
    }
  9. Go to "run and debug", then run the debugger associated to previous launch.json
  10. No breakpoint are hit, and they appear as "unbound breakpoint"

image

Debug console output:

Note: Using the "preview" debug extension
Verbose logs are written to:
c:\Users\rafou\AppData\Roaming\Code\logs\20211223T133832\exthost3\ms-vscode.js-debug-nightly\vscode-debugadapter-b82e2d06.json.gz
[Quasar] Running SPA.
webpack:/quasartest/.quasar/client-entry.js:46
[13248:24372:1224/113705.134:ERROR:device_event_log_impl.cc(214)] [11:37:05.134] USB: usb_service_win.cc:204 Failed to get device address: �l�ment introuvable. (0x490)
[13248:24372:1224/113705.136:ERROR:device_event_log_impl.cc(214)] [11:37:05.136] USB: usb_device_handle_win.cc:1048 Failed to read descriptor from node connection: Un p�riph�rique attach� au syst�me ne fonctionne pas correctement. (0x1F)
[13248:24372:1224/113705.142:ERROR:device_event_log_impl.cc(214)] [11:37:05.142] USB: usb_device_handle_win.cc:1048 Failed to read descriptor from node connection: Un p�riph�rique attach� au syst�me ne fonctionne pas correctement. (0x1F)
[13248:8776:1224/113705.169:ERROR:chrome_browser_main_extra_parts_metrics.cc(226)] crbug.com/1216328: Checking Bluetooth availability started. Please report if there is no report that this ends.
[13248:8776:1224/113705.178:ERROR:chrome_browser_main_extra_parts_metrics.cc(229)] crbug.com/1216328: Checking Bluetooth availability ended.
[13248:8776:1224/113705.179:ERROR:chrome_browser_main_extra_parts_metrics.cc(232)] crbug.com/1216328: Checking default browser status started. Please report if there is no report that this ends.
[13248:8776:1224/113705.211:ERROR:chrome_browser_main_extra_parts_metrics.cc(236)] crbug.com/1216328: Checking default browser status ended.

The errors seem unrelated to me ?

Log File vscode-debugadapter-b82e2d06.json.gz

VS Code Version: image

Additional context Tried with both vanilla and nightly version of ms-vscode.js-debug

connor4312 commented 2 years ago

Thanks for the issue. It's currently not possible for us to set breakpoints in Vue apps correctly for TypeScript components; please lend your support to https://github.com/vuejs/vue/issues/11023 to get this fixed.