vscode-js-debug: Breakpoints Don't Hit
Type: Bug
Hi, For some reason, my VSC JavaScript breakpoints don’t hit. I am not sure what I am doing wrong. Below you will find my launch.json file. { // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 “version”: “0.2.0”, “configurations”: [
{
"type": "chrome",
"request": "launch",
"name": "Launch Chrome against localhost",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}",
"file":"${workspaceFolder}/index.html"
}
]
} All of my JavaScript files are in a js folder in the workspace. The index.html file loads the JavaScript files from the js folder. I can provide screenshots / more details as need be. Thank you Peter Schaeffer
VS Code version: Code 1.76.0 (92da9481c0904c6adfe372c12da3b7748d74bdcb, 2023-03-01T10:22:44.506Z) OS version: Windows_NT x64 10.0.19045 Modes: Sandboxed: Yes
System Info
Item | Value |
---|---|
CPUs | Intel® Core™ i7-4702HQ CPU @ 2.20GHz (8 x 2195) |
GPU Status | 2d_canvas: enabled canvas_oop_rasterization: disabled_off direct_rendering_display_compositor: disabled_off_ok gpu_compositing: enabled multiple_raster_threads: enabled_on opengl: enabled_on rasterization: enabled raw_draw: disabled_off_ok skia_renderer: enabled_on video_decode: enabled video_encode: unavailable_off vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: disabled_off |
Load (avg) | undefined |
Memory (System) | 15.91GB (7.24GB free) |
Process Argv | –crash-reporter-id 7c17602d-d116-41bf-9eeb-6f288773aaef |
Screen Reader | no |
VM | 0% |
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstes627:30244334
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30445986
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
vsclangdf:30486550
c4g48928:30535728
dsvsc012cf:30540253
azure-dev_surveyone:30548225
pyindex848:30662994
nodejswelcome1:30587005
282f8724:30602487
pyind779:30671433
f6dab269:30613381
pythonsymbol12:30671437
showlangstatbar:30672706
vsctsb:30677850
funwalk2cf:30676044
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 15 (6 by maintainers)
Commits related to this issue
- fix: prefer file over url, set breakpoints correctly Fixes #1598 — committed to microsoft/vscode-js-debug by connor4312 a year ago
- fix: prefer file over url, set breakpoints correctly (#1599) * fix: prefer file over url, set breakpoints correctly Fixes #1598 * fix tests — committed to microsoft/vscode-js-debug by connor4312 a year ago
I am also seeing this issue in a project where breakpoints were functioning correctly prior to v1.76.0.
launch.json below, autogenerated by VSCode:
{ // Use IntelliSense to learn about possible attributes. // Hover to view descriptions of existing attributes. // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "type": "chrome", "request": "launch", "name": "Launch Chrome against localhost", "url": "http://localhost:8080", "webRoot": "${workspaceFolder}" } ] }
I see the prefers file over url fix above, but I require the url option.
When I launch my application with any breakpoints set, the launch process never completes. If I launch my application with the debugger with no breakpoints set, it launches fine. I can then set breakpoints which function as desired until I either refresh the browser, refresh the debugger or relaunch the application at which point the launch process never completes.