vscode: "Unbound breakpoint" (missing source maps) when debugging any typescript project (after 1.83.0 update)
Type: Bug
I recently stopped being able to use breakpoints across multiple typescript projects (they show up as Unbound breakpoint because source maps aren’t found), and I’m wondering if it’s a bug in the recent 1.83.0 release. Here’s a simple repro:
-
Launch latest insiders build with
--disable-extensions(on mac):/Applications/Visual\ Studio\ Code\ -\ Insiders.app/Contents/Resources/app/bin/code --disable-extensions
-
Open a sample typescript project from vscode-extension-samples:
- https://github.com/Microsoft/vscode-extension-samples/tree/main/document-editing-sample
- I’m on commit a8a74c4 (2023-10-03), and I have no local changes
-
Run
npm installin the project dir:
~/hack/vscode/vscode-extension-samples/document-editing-sample $ npm install
added 133 packages, and audited 134 packages in 1s
34 packages are looking for funding
run `npm fund` for details
1 moderate severity vulnerability
To address all issues, run:
npm audit fix
Run `npm audit` for details.
-
Set a breakpoint, observe that it shows as red (no debugger running yet):
-
Run
Debug: Start Debugging(F5) -
Observe that the breakpoint icon changes from red to gray, and shows
Unbound breakpointon hover: -
Click the “troubleshoot” link (
Debug: Diagnose Breakpoint Problems) and observe that it says it can’t find the source maps: -
Observe that
tsconfig.jsonand.vscode/launch.jsonboth look sane:
~/hack/vscode/vscode-extension-samples/document-editing-sample $ cat tsconfig.json
{
"compilerOptions": {
"module": "commonjs",
"target": "es2020",
"lib": ["es2020"],
"outDir": "out",
"sourceMap": true,
"strict": true,
"rootDir": "src"
},
"exclude": ["node_modules", ".vscode-test"]
}
~/hack/vscode/vscode-extension-samples/document-editing-sample $ cat .vscode/launch.json
// A launch configuration that compiles the extension and then opens it inside a new window
// 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": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"preLaunchTask": "npm: watch"
}
]
}
~/hack/vscode/vscode-extension-samples/document-editing-sample $ ls -l out/**/*.js*
-rw-r--r-- 1 danb staff 882 Oct 6 15:00 out/extension.js
-rw-r--r-- 1 danb staff 775 Oct 6 15:00 out/extension.js.map
VS Code version: Code - Insiders 1.84.0-insider (Universal) (874831ebcf088f59735879156f62308ce48f17d1, 2023-10-06T19:18:47.163Z) OS version: Darwin arm64 22.6.0 Modes:
System Info
| Item | Value |
|---|---|
| CPUs | Apple M1 Max (10 x 24) |
| GPU Status | 2d_canvas: enabled canvas_oop_rasterization: enabled_on 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: enabled vulkan: disabled_off webgl: enabled webgl2: enabled webgpu: enabled |
| Load (avg) | 4, 5, 4 |
| Memory (System) | 64.00GB (7.95GB free) |
| Process Argv | –disable-extensions --crash-reporter-id cb425818-8a3a-4635-a2ba-c031aec9b12c |
| Screen Reader | no |
| VM | 0% |
A/B Experiments
vsliv695:30137379
vsins829:30139715
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
pythontb:30258533
pythonptprofiler:30281269
vshan820:30294714
vscod805:30301674
bridge0708:30335490
bridge0723:30353136
vsaa593cf:30376535
pythonvs932:30404738
py29gd2263:30784851
vsclangdf:30492506
c4g48928:30535728
dsvsc012:30540252
pynewext54:30618038
2i9eh265:30646982
showlangstatbar:30737417
7ij38806:30687742
pythonfmttext:30716741
fixshowwlkth:30771523
showindicator:30805243
pythongtdpath:30726887
i26e3531:30792625
welcomedialog:30812478
pythonnosmt12:30779711
pythonidxpt:30768918
pythonnoceb:30776497
copilotsettingt:30808721
synctok:30821570
dsvsc013:30777762
dsvsc014:30777825
diffeditorv2:30786206
pythonmpsinfo:30842935
dsvsc015:30821418
pythontestfixt:30826906
pythonfb280951:30830809
pythonregdiag:30842812
pythonmypyd1:30850305
pythoncet0:30848247
About this issue
- Original URL
- State: closed
- Created 9 months ago
- Reactions: 2
- Comments: 25 (6 by maintainers)
Commits related to this issue
- fix: also use script ID bps if there is a different embeddername For https://github.com/microsoft/vscode/issues/195037\#issuecomment-1759343645 — committed to microsoft/vscode-js-debug by connor4312 9 months ago
- fix: also use script ID bps if there is a different embeddername (#1846) For https://github.com/microsoft/vscode/issues/195037\#issuecomment-1759343645 — committed to microsoft/vscode-js-debug by connor4312 9 months ago
Thanks, I’m not sure why (without more information about your build setup) your case is different than others’.
I believe it should be fixed in the linked PR, please try the nightly build after 5PM PDT today and let me know if you continue to experience issues.
Nothing changed as far as I know in extension activation. Particularly for the sample extension, it activating without a command would be a serious bug, since lazy activation is important for VS Code’s performance.
The same for me