Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unbound breakpoint #1748

Closed
murrellr opened this issue Jun 8, 2023 · 4 comments · Fixed by #1749
Closed

Unbound breakpoint #1748

murrellr opened this issue Jun 8, 2023 · 4 comments · Fixed by #1749
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug

Comments

@murrellr
Copy link

murrellr commented Jun 8, 2023

Type: Bug

I am no longer able to set breakpoints in my Javascript code. When I run, the red dot changes to a gray circle. Hovering the cursor over it says it is an "Unbound breakpoint". Opening the troubleshooter shows this:

This breakpoint was initially set in:

C:\Devel\web\tst2\test2.js line 8 column 1
We couldn't find a corresponding source location, but found some other files with the same name:
c:\Devel\web\tst2\test2.js
You may need to adjust the webRoot in your launch.json if you're building from a subfolder, or tweak your sourceMapPathOverrides.

I tried changing the launch configuration, and I don't know what "sourceMapPathOverrides" are. Here is how to reproduce:
Workspace:

C:\Devel\web\
    tst\
        test.html
        test1.js
    tst2\
        test2.js

test.html:

<!DOCTYPE html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<meta name='viewport' content='width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1' />
<meta name="apple-mobile-web-app-capable" content="yes" />
<script src="..\tst2\test2.js"></script>
<script src="test1.js"></script>

test1.js:

function main(ip)
{
	document.body.innerHTML="<div id='home'><p>Hello world!</p></div>"
    Logit();
}
window.onload=js_startup;

test2.js:

function js_startup()
{
		main();
}

function Logit()
{
    console.log("What, me worry?")
}

Launch configuration:

		{
			"name": "Tst",
			"request": "launch",
			"type": "chrome",
			"file": "${workspaceFolder}/tst/test.html",
			"webRoot": "${workspaceFolder}/tst"
		}

Set a breakpoint in test2.js Logit on the "console.log" line.

VS Code version: Code 1.78.2 (b3e4e68a0bc097f0ae7907b217c1119af9e03435, 2023-05-10T14:39:26.248Z)
OS version: Windows_NT x64 10.0.19044
Modes:
Sandboxed: Yes

System Info
Item Value
CPUs Intel(R) Core(TM) i7-6820HQ CPU @ 2.70GHz (8 x 2712)
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
video_decode: enabled
video_encode: unavailable_off
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 15.83GB (7.05GB free)
Process Argv --crash-reporter-id 87c1d683-95a6-416a-b844-66ab3df3e049
Screen Reader no
VM 0%
Extensions (10)
Extension Author (truncated) Version
vscode-eslint dba 2.4.0
gitlens eam 13.6.0
shortcut-menu-bar jer 3.0.4
remote-ssh ms- 0.102.0
remote-ssh-edit ms- 0.86.0
hexeditor ms- 1.9.11
js-debug-nightly ms- 2023.6.617
remote-explorer ms- 0.4.0
intellicode-api-usage-examples Vis 0.2.7
vscodeintellicode Vis 1.2.30

(3 theme extensions excluded)

A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
vscoreces:30445986
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
vsclangdf:30486550
c4g48928:30535728
dsvsc012:30540252
pynewext54:30695312
azure-dev_surveyone:30548225
282f8724:30602487
pyind779:30671433
f6dab269:30613381
pythonsymbol12:30671437
a9j8j154:30646983
showlangstatbar:30737416
vsctsb:30748421
pythonms35:30701012
03d35959:30757346
pythonfmttext:30731395
pythoncmv:30756943
fixhidewlkth:30730051
hidesbindicator:30760978
pythongtdpathcf:30739705
pythonnosm12tcf:30757130

@murrellr
Copy link
Author

murrellr commented Jun 8, 2023

If I set the breakpoint after the code is running, it binds.

@connor4312
Copy link
Member

/jsDebugLogs

@vscodenpa
Copy link

Please collect trace logs using the following instructions:

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

@vscodenpa vscodenpa added the info-needed Issue requires more information from poster label Jun 12, 2023
@murrellr
Copy link
Author

Please see the attached log file.
vscode-debugadapter-08f2d59c.json.gz

@connor4312 connor4312 added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Jun 16, 2023
@connor4312 connor4312 transferred this issue from microsoft/vscode Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants