vscode-js-debug
vscode-js-debug copied to clipboard
Crash (OOM) on debugging
Describe the bug The extension host crashes on debugging (Another reproduction of https://github.com/microsoft/vscode-js-debug/issues/1911). Unfortunately this is a proprietary project so I can't share an immediate reproduction, but I'll share whatever I can that can help pinpoint what causes the crash.
To Reproduce Steps to reproduce the behavior:
- Try to debug JavaScript in a project with very large source maps.
Log File
vscode-debugadapter-f7de7273.json
VS Code Version: 1.97.2
Additional context
Another reproduction of https://github.com/microsoft/vscode-js-debug/issues/1911
Here is minimal reproduction repo: https://github.com/karolis-zukauskas/js-debug-sourcemap-oom
See comments in README.
Thanks, that was quite helpful. @segevfiner wonder if this fixes your use case too.
@connor4312 Did it reach the nightly yet? I'll play around and let you know if it happens again.
It should be on the latest version
@segevfiner - were you able to verify if this was resolved?
I didn't encounter this again just yet, but my reproduction was always rather sporadic. I'll open a new issue if I hit the problem again.
@amunger for me the crashes are gone with nightly. Last day I switched back to stable because there seems to be a new separate issue with nightly and the crashes immediately reappeared, so I guess this PR does indeed fix the OOM issue.
Managed to reproduce on nightly unfortunately:
vscode-debugadapter-d76d65d3.json
Let me know if you want to reopen this or for me to open another issue.
I get this constantly when trying to debug by attaching to node in our applications.
It happens in our apps and our jest tests.
We are running in a devcontainer.
I have disabled DWARF debugging info, but I suspect it has to do with our extensive use of WebAssembly.
Is there any way to increase the memory given to the extension host?
2025-05-23 16:48:18.042 [info] Getting Manifest... ms-vscode.js-debug-nightly
2025-05-23 16:48:18.175 [info] Installing extension: ms-vscode.js-debug-nightly {"isMachineScoped":false,"installPreReleaseVersion":false,"pinned":false,"donotVerifySignature":false,"context":{"clientTargetPlatform":"darwin-arm64"},"isApplicationScoped":false,"profileLocation":{"$mid":1,"fsPath":"/home/vscode/.vscode-server/extensions/extensions.json","external":"file:///home/vscode/.vscode-server/extensions/extensions.json","path":"/home/vscode/.vscode-server/extensions/extensions.json","scheme":"file"},"productVersion":{"version":"1.100.2","date":"2025-05-14T21:47:40.416Z"}}
2025-05-23 16:48:19.251 [info] Extension signature verification result for ms-vscode.js-debug-nightly: Success. Internal Code: 0. Executed: true. Duration: 732ms.
2025-05-23 16:48:19.283 [info] Extracted extension to file:///home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617: ms-vscode.js-debug-nightly
2025-05-23 16:48:19.293 [info] Renamed to /home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617
2025-05-23 16:48:19.330 [info] Extension installed successfully: ms-vscode.js-debug-nightly file:///home/vscode/.vscode-server/extensions/extensions.json
2025-05-23 16:48:43.886 [info] [127.0.0.1][6b01c953][ManagementConnection] The client has disconnected gracefully, so the connection will be disposed.
2025-05-23 16:48:44.014 [info] [127.0.0.1][36507063][ExtensionHostConnection] <2337520> Extension Host Process exited with code: 0, signal: null.
2025-05-23 16:48:50.065 [info] [127.0.0.1][8b24281b][ManagementConnection] New connection established.
2025-05-23 16:48:50.478 [info] [127.0.0.1][3f6ef0e0][ExtensionHostConnection] New connection established.
2025-05-23 16:48:50.517 [info] [127.0.0.1][3f6ef0e0][ExtensionHostConnection] <2346824> Launched Extension Host Process.
2025-05-23 16:51:11.954 [info] [127.0.0.1][3f6ef0e0][ExtensionHostConnection] <2346824><stderr>
<--- Last few GCs --->
[2346824:0x1d3c66a0] 141390 ms: Mark-Compact 4044.0 (4143.6) -> 4044.0 (4143.6) MB, 42.30 / 0.00 ms (average mu = 0.128, current mu = 0.008) allocation failure; scavenge might not succeed
[2346824:0x1d3c66a0] 141433 ms: Mark-Compact 4044.5 (4144.1) -> 4044.5 (4144.1) MB, 42.64 / 0.00 ms (average mu = 0.071, current mu = 0.009) allocation failure; scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
----- Native stack trace -----
2025-05-23 16:51:11.954 [info] [127.0.0.1][3f6ef0e0][ExtensionHostConnection] <2346824><stderr> 1: 0xb8cf03 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [/vscode/vscode-server/bin/linux-x64/848b80aeb52026648a8ff9f7c45a9b0a80641e2e/node]
2025-05-23 16:51:11.955 [info] [127.0.0.1][3f6ef0e0][ExtensionHostConnection] <2346824><stderr> 2: 0xf04140 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/vscode/vscode-server/bin/linux-x64/848b80aeb52026648a8ff9f7c45a9b0a80641e2e/node]
2025-05-23 16:51:11.955 [info] [127.0.0.1][3f6ef0e0][ExtensionHostConnection] <2346824><stderr> 3: 0xf04427 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [/vscode/vscode-server/bin/linux-x64/848b80aeb52026648a8ff9f7c45a9b0a80641e2e/node]
2025-05-23 16:51:11.956 [info] [127.0.0.1][3f6ef0e0][ExtensionHostConnection] <2346824><stderr> 4: 0x1116075 [/vscode/vscode-server/bin/linux-x64/848b80aeb52026648a8ff9f7c45a9b0a80641e2e/node]
2025-05-23 16:51:11.956 [info] [127.0.0.1][3f6ef0e0][ExtensionHostConnection] <2346824><stderr> 5: 0x112def8 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/vscode/vscode-server/bin/linux-x64/848b80aeb52026648a8ff9f7c45a9b0a80641e2e/node]
2025-05-23 16:51:11.956 [info] [127.0.0.1][3f6ef0e0][ExtensionHostConnection] <2346824><stderr> 6: 0x1104011 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/vscode/vscode-server/bin/linux-x64/848b80aeb52026648a8ff9f7c45a9b0a80641e2e/node]
2025-05-23 16:51:11.957 [info] [127.0.0.1][3f6ef0e0][ExtensionHostConnection] <2346824><stderr> 7: 0x11051a5 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/vscode/vscode-server/bin/linux-x64/848b80aeb52026648a8ff9f7c45a9b0a80641e2e/node]
2025-05-23 16:51:11.957 [info] [127.0.0.1][3f6ef0e0][ExtensionHostConnection] <2346824><stderr> 8: 0x10e18c6 v8::internal::Factory::AllocateRaw(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [/vscode/vscode-server/bin/linux-x64/848b80aeb52026648a8ff9f7c45a9b0a80641e2e/node]
2025-05-23 16:51:11.958 [info] [127.0.0.1][3f6ef0e0][ExtensionHostConnection] <2346824><stderr> 9: 0x10d34f4 v8::internal::FactoryBase<v8::internal::Factory>::AllocateRawWithImmortalMap(int, v8::internal::AllocationType, v8::internal::Map, v8::internal::AllocationAlignment) [/vscode/vscode-server/bin/linux-x64/848b80aeb52026648a8ff9f7c45a9b0a80641e2e/node]
2025-05-23 16:51:11.958 [info] [127.0.0.1][3f6ef0e0][ExtensionHostConnection] <2346824><stderr> 10: 0x10d5cd6 v8::internal::FactoryBase<v8::internal::Factory>::NewRawOneByteString(int, v8::internal::AllocationType) [/vscode/vscode-server/bin/linux-x64/848b80aeb52026648a8ff9f7c45a9b0a80641e2e/node]
2025-05-23 16:51:11.959 [info] [127.0.0.1][3f6ef0e0][ExtensionHostConnection] <2346824><stderr> 11: 0x10eccf4 v8::internal::Factory::NewStringFromUtf8(v8::base::Vector<char const> const&, v8::internal::AllocationType) [/vscode/vscode-server/bin/linux-x64/848b80aeb52026648a8ff9f7c45a9b0a80641e2e/node]
2025-05-23 16:51:11.959 [info] [127.0.0.1][3f6ef0e0][ExtensionHostConnection] <2346824><stderr> 12: 0xf169d2 v8::String::NewFromUtf8(v8::Isolate*, char const*, v8::NewStringType, int) [/vscode/vscode-server/bin/linux-x64/848b80aeb52026648a8ff9f7c45a9b0a80641e2e/node]
2025-05-23 16:51:11.959 [info] [127.0.0.1][3f6ef0e0][ExtensionHostConnection] <2346824><stderr> 13: 0xdefa37 [/vscode/vscode-server/bin/linux-x64/848b80aeb52026648a8ff9f7c45a9b0a80641e2e/node]
2025-05-23 16:51:11.960 [info] [127.0.0.1][3f6ef0e0][ExtensionHostConnection] <2346824><stderr> 14: 0xdefb6f node::StringDecoder::DecodeData(v8::Isolate*, char const*, unsigned long*) [/vscode/vscode-server/bin/linux-x64/848b80aeb52026648a8ff9f7c45a9b0a80641e2e/node]
2025-05-23 16:51:11.960 [info] [127.0.0.1][3f6ef0e0][ExtensionHostConnection] <2346824><stderr> 15: 0xdf00ad [/vscode/vscode-server/bin/linux-x64/848b80aeb52026648a8ff9f7c45a9b0a80641e2e/node]
16: 0x770ba7e4d546
I have disabled DWARF debugging info, but I suspect it has to do with our extensive use of WebAssembly.
To clarify, you see this issue resolved when you disable DWARF debug info?
No, the issue exists with DWARF debug info disabled.
Maybe I'm mis-understanding how to carve out files or maybe it has nothing to do with source maps?
The workspace is a monorepo with a few million lines of code, service oriented architecture backend and a WebGL/WASM based frontend (a collaborative electronics CAD application).
I'm using @swc/jest as the transformer for the TypeScript files attempting to be tested.
{
"type": "node",
"request": "attach",
"name": "Attach to Test",
"port" : 9227,
"enableDWARF": false,
"resolveSourceMapLocations": [
"!${workspaceFolder}/**",
"!**/node_modules/**",
"!**/*.wasm_",
"!packages/common/wasm/**"
]
},
I'll look into it. We do decompile WASM->WAT regardless of enableDWARF. I try not to do that eagerly but the structure of DAP requires us to do it more often than I would like. So that could be a contributing factor.
I should PR a "take heap snapshot" button into vscode's extension view to make it easier for people to help collect memory data 😄
Is there currently a way to take a heap snapshot? I can try and do that next time I manage to reproduce, though I will need to get approval from my employer to share it privately with you due to size and risk of confidential content in such a dump...
A bit annoying but the way to do it without setup is
- Run "Show Running Extensions" and hit the "take extension host profile" button and then just stop it. This'll cause the inspector to open for the extension host on port 9229
- Either use devtools
edge://inspector the JS debugger in another window to attach to localhost:9229 - Take a heap snapshot (Take Performance Profile > Heap Snapshot in js-debug). Note that this can take a few minutes to collect, but once it's ready it'll save a
.heapsnapshotfile to your workspace folder.
My issue is in my dev container that when I attempt to attach to jest in watch mode with the Visual Studio Code debugger, I get:
Debug adapter process has terminated unexpectedly (Extension host shut down)
When I do "Show Running Extensions" and then hit the green play button on the "JavaScript Debugger (Nightly)", it opens yet another Visual Studio Code window (also attached to my dev container) that appears to be debugging the extension.
When I then do "Attach to Test" in my original Visual Studio Code window, I get the Debug adapter process has terminated unexpectedly (Extension host shut down) and then in the second Visual Studio Code window, it has detached from the (now crashed) extension but I get these logs:
{"timestamp":1748127614062,"tag":"runtime.welcome","level":1,"message":"js-debug-nightly v2025.5.1617 started","metadata":{"os":"linux x64","nodeVersion":"v20.19.0","adapterVersion":"2025.5.1617"}}
{"tag":"dap.receive","timestamp":1748127614009,"metadata":{"connectionId":0,"message":{"command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"pwa-node","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en","supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryReferences":true,"supportsArgsCanBeInterpretedByShell":true,"supportsMemoryEvent":true,"supportsStartDebuggingRequest":true,"supportsANSIStyling":true},"type":"request","seq":1}},"level":0}
{"tag":"dap.send","timestamp":1748127614009,"metadata":{"connectionId":0,"message":{"seq":1,"type":"response","request_seq":1,"command":"initialize","success":true,"body":{"supportsConfigurationDoneRequest":true,"supportsFunctionBreakpoints":false,"supportsConditionalBreakpoints":true,"supportsHitConditionalBreakpoints":true,"supportsEvaluateForHovers":true,"supportsReadMemoryRequest":true,"supportsWriteMemoryRequest":true,"exceptionBreakpointFilters":[{"filter":"all","label":"Caught Exceptions","default":false,"supportsCondition":true,"description":"Breaks on all throw errors, even if they're caught later.","conditionDescription":"error.name == \"MyError\""},{"filter":"uncaught","label":"Uncaught Exceptions","default":false,"supportsCondition":true,"description":"Breaks only on errors or promise rejections that are not handled.","conditionDescription":"error.name == \"MyError\""}],"supportsStepBack":false,"supportsSetVariable":true,"supportsRestartFrame":true,"supportsGotoTargetsRequest":false,"supportsStepInTargetsRequest":true,"supportsCompletionsRequest":true,"supportsModulesRequest":false,"additionalModuleColumns":[],"supportedChecksumAlgorithms":[],"supportsRestartRequest":true,"supportsExceptionOptions":false,"supportsValueFormattingOptions":true,"supportsExceptionInfoRequest":true,"supportTerminateDebuggee":true,"supportsDelayedStackTraceLoading":true,"supportsLoadedSourcesRequest":true,"supportsLogPoints":true,"supportsTerminateThreadsRequest":false,"supportsSetExpression":true,"supportsTerminateRequest":false,"completionTriggerCharacters":[".","[","\"","'"],"supportsBreakpointLocationsRequest":true,"supportsClipboardContext":true,"supportsExceptionFilterOptions":true,"supportsEvaluationOptions":false,"supportsDebuggerProperties":false,"supportsSetSymbolOptions":false,"supportsANSIStyling":true}}},"level":0}
{"tag":"dap.send","timestamp":1748127614010,"metadata":{"connectionId":0,"message":{"seq":2,"type":"event","event":"initialized","body":{}}},"level":0}
{"tag":"dap.receive","timestamp":1748127614055,"metadata":{"connectionId":0,"message":{"command":"attach","arguments":{"type":"pwa-node","name":"Attach Extension Host","request":"attach","trace":{"stdio":true,"logFile":"/home/vscode/.vscode-server/data/logs/20250524T184435/exthost2/ms-vscode.js-debug-nightly/vscode-debugadapter-90ef626b.json"},"outputCapture":"console","timeout":10000,"timeouts":{"sourceMapMinPause":30000,"sourceMapCumulativePause":300000},"showAsyncStacks":true,"skipFiles":["<node_internals>/**"],"smartStep":true,"sourceMaps":true,"sourceMapRenames":true,"pauseForSourceMap":false,"resolveSourceMapLocations":null,"outFiles":["!**/node_modules/**"],"sourceMapPathOverrides":{"webpack:////*":"/*","webpack:///([a-z]):/(.+)":"$1:/$2"},"enableContentValidation":true,"cascadeTerminateToConfigurations":[],"enableDWARF":true,"__workspaceFolder":"","__breakOnConditionalError":false,"env":{},"envFile":null,"localRoot":null,"remoteRoot":null,"autoAttachChildProcesses":true,"runtimeSourcemapPausePatterns":[],"attachExistingChildren":true,"address":"localhost","port":53186,"restart":false,"continueOnAttach":false,"eagerSources":true,"__sessionId":"d96b8b76-4c69-435e-9e55-b601e8fdba71"},"type":"request","seq":2}},"level":0}
{"tag":"dap.send","timestamp":1748127614055,"metadata":{"connectionId":0,"message":{"seq":3,"type":"event","event":"output","body":{"category":"console","output":"Note: Using the \"preview\" debug extension\n"}}},"level":0}
{"tag":"dap.send","timestamp":1748127614056,"metadata":{"connectionId":0,"message":{"seq":4,"type":"event","event":"output","body":{"category":"telemetry","output":"js-debug/launch","data":{"type":"pwa-node","request":"attach","os":"linux x64","nodeVersion":"v20.19.0","adapterVersion":"2025.5.1617","parameters":"{\"type\":\"pwa-node\",\"name\":\"<string>\",\"request\":\"attach\",\"trace\":{\"stdio\":true,\"logFile\":\"<string>\"},\"outputCapture\":\"console\",\"timeout\":10000,\"timeouts\":{\"sourceMapMinPause\":30000,\"sourceMapCumulativePause\":300000},\"showAsyncStacks\":true,\"skipFiles\":[\"<string>\"],\"smartStep\":true,\"sourceMaps\":true,\"sourceMapRenames\":true,\"pauseForSourceMap\":false,\"resolveSourceMapLocations\":null,\"outFiles\":[\"<string>\"],\"sourceMapPathOverrides\":{\"webpack:////*\":\"<string>\",\"webpack:///([a-z]):/(.+)\":\"<string>\"},\"enableContentValidation\":true,\"cascadeTerminateToConfigurations\":[],\"enableDWARF\":true,\"__workspaceFolder\":\"<string>\",\"__breakOnConditionalError\":false,\"env\":{},\"envFile\":null,\"localRoot\":null,\"remoteRoot\":null,\"autoAttachChildProcesses\":true,\"runtimeSourcemapPausePatterns\":[],\"attachExistingChildren\":true,\"address\":\"localhost\",\"port\":53186,\"restart\":false,\"continueOnAttach\":false,\"eagerSources\":true,\"__sessionId\":\"<string>\"}"}}}},"level":0}
{"tag":"dap.send","timestamp":1748127614056,"metadata":{"connectionId":0,"message":{"seq":5,"type":"event","event":"output","body":{"category":"console","output":"Verbose logs are written to:\n/home/vscode/.vscode-server/data/logs/20250524T184435/exthost2/ms-vscode.js-debug-nightly/vscode-debugadapter-90ef626b.json\n"}}},"level":0}
{"tag":"dap.receive","timestamp":1748127614073,"metadata":{"connectionId":0,"message":{"command":"setExceptionBreakpoints","arguments":{"filters":[],"filterOptions":[]},"type":"request","seq":3}},"level":0}
{"tag":"dap.send","timestamp":1748127614073,"metadata":{"connectionId":0,"message":{"seq":6,"type":"response","request_seq":3,"command":"setExceptionBreakpoints","success":true,"body":{}}},"level":0}
{"tag":"dap.receive","timestamp":1748127614092,"metadata":{"connectionId":0,"message":{"command":"configurationDone","type":"request","seq":4}},"level":0}
{"tag":"dap.send","timestamp":1748127614092,"metadata":{"connectionId":0,"message":{"seq":7,"type":"response","request_seq":4,"command":"configurationDone","success":true,"body":{}}},"level":0}
{"tag":"dap.receive","timestamp":1748127614094,"metadata":{"connectionId":0,"message":{"command":"threads","type":"request","seq":5}},"level":0}
{"tag":"dap.send","timestamp":1748127614094,"metadata":{"connectionId":0,"message":{"seq":8,"type":"response","request_seq":5,"command":"threads","success":true,"body":{"threads":[]}}},"level":0}
{"tag":"runtime.launch","timestamp":1748127617249,"message":"Error looking up /json/version","metadata":{"ok":false,"body":"connect ECONNREFUSED ::1:53186","statusCode":503,"url":"http://[::1]:53186/json/version","error":{"message":"Unexpected 503 response from http://[::1]:53186/json/version: connect ECONNREFUSED ::1:53186","stack":"Error: Unexpected 503 response from http://[::1]:53186/json/version: connect ECONNREFUSED ::1:53186\n\tat Bs.requestHttp (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:2996)\n\tat process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n\tat async Bs.fetchHttp (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:2311)\n\tat async Bs.fetchJson (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:1732)\n\tat async /home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:38929"}},"level":0}
{"tag":"runtime.launch","timestamp":1748127617249,"message":"Error looking up /json/list","metadata":{"ok":false,"body":"connect ECONNREFUSED ::1:53186","statusCode":503,"url":"http://[::1]:53186/json/list","error":{"message":"Unexpected 503 response from http://[::1]:53186/json/list: connect ECONNREFUSED ::1:53186","stack":"Error: Unexpected 503 response from http://[::1]:53186/json/list: connect ECONNREFUSED ::1:53186\n\tat Bs.requestHttp (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:2996)\n\tat process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n\tat async Bs.fetchHttp (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:2311)\n\tat async Bs.fetchJson (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:1732)\n\tat async /home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:38929"}},"level":0}
{"tag":"dap.send","timestamp":1748127619010,"metadata":{"connectionId":0,"message":{"seq":9,"type":"event","event":"output","body":{"category":"telemetry","output":"js-debug/dap/operation","data":{"errors":[],"initialize":{"operation":"initialize","totalTime":0.7,"max":0.7,"avg":0.7,"stddev":null,"count":1,"failed":0},"!initialize.errors":[],"setExceptionBreakpoints":{"operation":"setExceptionBreakpoints","totalTime":0.3,"max":0.3,"avg":0.3,"stddev":null,"count":1,"failed":0},"!setExceptionBreakpoints.errors":[],"configurationDone":{"operation":"configurationDone","totalTime":0.2,"max":0.2,"avg":0.2,"stddev":null,"count":1,"failed":0},"!configurationDone.errors":[],"threads":{"operation":"threads","totalTime":0.1,"max":0.1,"avg":0.1,"stddev":null,"count":1,"failed":0},"!threads.errors":[]}}}},"level":0}
{"tag":"runtime.launch","timestamp":1748127620591,"message":"Error looking up /json/version","metadata":{"ok":false,"body":"connect ECONNREFUSED 127.0.0.1:53186","statusCode":503,"url":"http://127.0.0.1:53186/json/version","error":{"message":"Unexpected 503 response from http://127.0.0.1:53186/json/version: connect ECONNREFUSED 127.0.0.1:53186","stack":"Error: Unexpected 503 response from http://127.0.0.1:53186/json/version: connect ECONNREFUSED 127.0.0.1:53186\n\tat Bs.requestHttp (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:2996)\n\tat process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n\tat async Bs.fetchHttp (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:2311)\n\tat async Bs.fetchJson (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:1732)\n\tat async /home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:38929"}},"level":0}
{"tag":"runtime.launch","timestamp":1748127620591,"message":"Error looking up /json/list","metadata":{"ok":false,"body":"connect ECONNREFUSED ::1:53186","statusCode":503,"url":"http://[::1]:53186/json/list","error":{"message":"Unexpected 503 response from http://[::1]:53186/json/list: connect ECONNREFUSED ::1:53186","stack":"Error: Unexpected 503 response from http://[::1]:53186/json/list: connect ECONNREFUSED ::1:53186\n\tat Bs.requestHttp (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:2996)\n\tat process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n\tat async Bs.fetchHttp (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:2311)\n\tat async Bs.fetchJson (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:1732)\n\tat async /home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:38929"}},"level":0}
{"tag":"runtime.launch","timestamp":1748127623932,"message":"Error looking up /json/version","metadata":{"ok":false,"body":"connect ECONNREFUSED 127.0.0.1:53186","statusCode":503,"url":"http://127.0.0.1:53186/json/version","error":{"message":"Unexpected 503 response from http://127.0.0.1:53186/json/version: connect ECONNREFUSED 127.0.0.1:53186","stack":"Error: Unexpected 503 response from http://127.0.0.1:53186/json/version: connect ECONNREFUSED 127.0.0.1:53186\n\tat Bs.requestHttp (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:2996)\n\tat process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n\tat async Bs.fetchHttp (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:2311)\n\tat async Bs.fetchJson (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:1732)\n\tat async /home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:38929"}},"level":0}
{"tag":"runtime.launch","timestamp":1748127623933,"message":"Error looking up /json/list","metadata":{"ok":false,"body":"connect ECONNREFUSED ::1:53186","statusCode":503,"url":"http://[::1]:53186/json/list","error":{"message":"Unexpected 503 response from http://[::1]:53186/json/list: connect ECONNREFUSED ::1:53186","stack":"Error: Unexpected 503 response from http://[::1]:53186/json/list: connect ECONNREFUSED ::1:53186\n\tat Bs.requestHttp (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:2996)\n\tat process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n\tat async Bs.fetchHttp (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:2311)\n\tat async Bs.fetchJson (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:1732)\n\tat async /home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:38929"}},"level":0}
{"tag":"runtime.launch","timestamp":1748127624138,"message":"Error looking up /json/version","metadata":{"ok":false,"body":"Promise was canceled","statusCode":503,"url":"http://[::1]:53186/json/version","error":{"message":"Unexpected 503 response from http://[::1]:53186/json/version: Promise was canceled","stack":"Error: Unexpected 503 response from http://[::1]:53186/json/version: Promise was canceled\n\tat Bs.requestHttp (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:2996)\n\tat processTicksAndRejections (node:internal/process/task_queues:95:5)\n\tat runNextTicks (node:internal/process/task_queues:64:3)\n\tat listOnTimeout (node:internal/timers:545:9)\n\tat process.processTimers (node:internal/timers:519:7)\n\tat async Bs.fetchHttp (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:2311)\n\tat async Bs.fetchJson (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:1732)\n\tat async /home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:38929"}},"level":0}
{"tag":"runtime.launch","timestamp":1748127624138,"message":"Error looking up /json/list","metadata":{"ok":false,"body":"Promise was canceled","statusCode":503,"url":"http://[::1]:53186/json/list","error":{"message":"Unexpected 503 response from http://[::1]:53186/json/list: Promise was canceled","stack":"Error: Unexpected 503 response from http://[::1]:53186/json/list: Promise was canceled\n\tat Bs.requestHttp (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:2996)\n\tat process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n\tat async Bs.fetchHttp (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:2311)\n\tat async Bs.fetchJson (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:1732)\n\tat async /home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:38929"}},"level":0}
{"tag":"runtime.launch","timestamp":1748127624138,"message":"Launch returned error","metadata":{"error":{"message":"Could not connect to debug target at http://localhost:53186: Could not find any debuggable target","stack":"Error: Could not connect to debug target at http://localhost:53186: Could not find any debuggable target\n\tat /home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:39101\n\tat process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n\tat async n (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:113:3529)\n\tat async Ql.launch (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:111:32522)\n\tat async GS.captureLaunch (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:131:12022)\n\tat async GS._launch (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:131:11769)\n\tat async Promise.all (index 5)\n\tat async GS._boot (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:131:10893)\n\tat async /home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:131:9724\n\tat async uu._onMessage (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:48:5028)"},"wasCancelled":true,"name":"Ql"},"level":2}
{"tag":"dap.send","timestamp":1748127624138,"metadata":{"connectionId":0,"message":{"seq":10,"type":"response","request_seq":2,"command":"attach","success":false,"body":{"error":{"id":9221,"format":"Error processing attach: Error: Could not connect to debug target at http://localhost:53186: Could not find any debuggable target\n\tat /home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:108:39101\n\tat process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n\tat async n (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:113:3529)\n\tat async Ql.launch (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:111:32522)\n\tat async GS.captureLaunch (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:131:12022)\n\tat async GS._launch (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:131:11769)\n\tat async Promise.all (index 5)\n\tat async GS._boot (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:131:10893)\n\tat async /home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:131:9724\n\tat async uu._onMessage (/home/vscode/.vscode-server/extensions/ms-vscode.js-debug-nightly-2025.5.1617/src/extension.js:48:5028)","showUser":false,"sendTelemetry":false}}}},"level":0}
{"tag":"dap.receive","timestamp":1748127624209,"metadata":{"connectionId":0,"message":{"command":"disconnect","arguments":{"restart":false},"type":"request","seq":6}},"level":0}
{"tag":"dap.send","timestamp":1748127624209,"metadata":{"connectionId":0,"message":{"seq":11,"type":"response","request_seq":6,"command":"disconnect","success":true,"body":{}}},"level":0}
{"tag":"dap.send","timestamp":1748127629210,"message":"Not sending message because the connection has ended","metadata":{"seq":0,"type":"event","event":"output","body":{"category":"telemetry","output":"js-debug/dap/operation","data":{"errors":[],"disconnect":{"operation":"disconnect","totalTime":0.9,"max":0.9,"avg":0.9,"stddev":null,"count":1,"failed":0},"!disconnect.errors":[]}}},"level":2}
It's not clear to me how I would take a memory snapshot of the extension host since the debugger disconnects when it crashes.
Do you mean a memory snapshot before it crashes? Or something else?
Thanks so much for your help!