Skip to content

Extension host utility process crashes intermittently (exit code 134) when launching Extension Development Host via F5 (js-debug auto-attach) #336233

Closed as not planned

Description

Does this issue occur when all extensions are disabled?: Yes/No

Issue body

  • VS Code Version: 1.137.0 (also reproduced on 1.136.2; started after an upgrade from ~1.13x)
  • OS Version: Windows 11 Pro (10.0.26200), VS Code running as Administrator
  • Extension: any extension under development (type: extensionHost launch config, no dependency on a specific extension — crash happens before any extension code runs)

Steps to Reproduce

  1. Open a folder containing an extension with a standard "type": "extensionHost" launch configuration.
  2. Press F5 (Start Debugging) to launch the Extension Development Host.
  3. The extension host utility process crashes within ~1 second of startup.

Intermittent: it fails most of the time on a fresh launch, but occasionally succeeds (e.g. one launch out of several succeeded at 14:38 in the log below).

What happens

The extension host (running as a utility process) aborts right at the "Loading development extension" stage — before any extension code executes:

window2/renderer.log (dev host window):

2026-09-15 14:16:53.390 [info] Started local extension host with pid 26764.
2026-09-15 14:16:53.592 [info] Loading development extension at d:\R-Link V\vscode-plugin
<crash ~1s later>

main.log:

2026-09-15 14:16:54.590 [info] Extension host with pid 26764 exited with code: 134, signal: unknown.
2026-09-15 14:16:54.590 [error] [UtilityProcess id: 2, type: extensionHost, pid 26764]: crashed with code 134 and reason 'crashed'

No crashpad dump is generated for these crashes (Crashpad reports folder stays empty).

Control experiments (same machine, same workspace, same compiled extension)

Launch method Result
F5 (js-debug auto-attach / injection) Crashed at 14:16, 14:30, 14:45 — always within ~1s, at "Loading development extension"
Same F5 config with extra arg --inspect-extensions=9333 Still crashes (the injection path is unchanged)
Ctrl+F5 (Run Without Debugging) Stable every time
CLI launch code --extensionDevelopmentPath=... --inspect-extensions=9333 + manual Node attach to port 9333 Stable: dev host survives, port listens, debugger attaches (TCP Established), breakpoints work

Timeline from main.log on Sep 15:

11:15:27, 11:16:21, 11:17:49, 11:22:15  crashed 134  (repeated F5 attempts)
13:53:04                             crashed 134  (F5)
14:16:54                             crashed 134  (F5, repro 1)
14:22:53  Ctrl+F5                    alive
14:30:27                             crashed 134  (F5, repro 2)
14:38                                F5 succeeded once (intermittent)
14:45:51                             crashed 134  (F5 with --inspect-extensions arg)
14:51:02  CLI launch + attach        alive, debugger attached
14:53:00  CLI launch                 alive

Expected behavior

F5 should launch the Extension Development Host reliably; at minimum the extension host utility process should not abort during js-debug bootstrap.

Notes

  • The crash is clearly tied to the js-debug launch/auto-attach path into the extension host utility process (introduced when the extension host moved to utility processes), not to the extension under development: crash occurs before extension activation, and every non-injecting launch path is stable.
  • Workaround we are using: launch the dev host via CLI/task with --inspect-extensions=9333, then attach with a "type": "node", "request": "attach", "port": 9333 config.
  • Environment checked and ruled out: no NODE_OPTIONS, no ELECTRON_RUN_AS_NODE in user/system env.
  • Happy to provide the full session logs (main.log, window renderer.log, exthost.log) if needed.

Activity

  1. WilliamSmithEdward commented on Sep 19, 2026

    @WilliamSmithEdward

    Same failure on 1.138.0 (7debcd0, x64),
    Windows 11 Pro 10.0.26200. Four crashes here today, every one an F5 into an
    Extension Development Host, every one code 134 within about 1.2s of the host
    starting:

    07:22:51.863 [error] [UtilityProcess id: 2, type: extensionHost, pid: 16624]: crashed with code 134 and reason 'crashed'
    07:47:47.461 [error] [UtilityProcess id: 4, type: extensionHost, pid: 31280]: crashed with code 134 and reason 'crashed'
    07:47:53.072 [error] [UtilityProcess id: 5, type: extensionHost, pid: 30784]: crashed with code 134 and reason 'crashed'
    

    A fourth crashed at 04:12:10 in an earlier session. The two at 07:47 are
    consecutive F5 presses six seconds apart; the attempt ten seconds after them
    started normally. The renderer log of each crashed window ends the same way:

    07:47:46.343 [info] Started local extension host with pid 31280.
    07:47:46.381 [info] Loading development extension at ...\xlide_vscode
    

    One detail I have not seen recorded yet: a crashed window has no exthost
    log folder at all. A window whose host survives gets
    window<N>/exthost/exthost.log, whose first line is "Extension host with pid
    N started". The three windows above hold only renderer.log, network.log
    and the output folder, so the host aborts before it writes its first log
    line. That is earlier than "before extension activation".

    Possibly related, and the reason I went looking: the dev-host windows that do
    survive log this, three times in a window that lived about 90 seconds.

    [error] TypeError: Missing dataLength in event
        at broadcastToFrontend (node:inspector:212:3)
        at Object.dataReceived (node:inspector:221:29)
        at IncomingMessage.<anonymous> (node:internal/inspector/network_http:140:13)
        at IncomingMessage.emit (node:events:521:24)
    

    That is Node's network inspection instrumentation, which runs only while a
    debugger is attached. js-debug turns it on by default through
    debug.javascript.enableNetworkView. It is the one part of the injection
    path I can see throwing on this machine, and it has the same F5-only shape as
    the crash. I have not tested whether turning the setting off changes the
    crash rate, since reproducing needs an F5 launch.

    No crashpad dump was written for any of the four, matching the report above.

    The extension under development is TypeScript bundled with esbuild: a 14 MB
    development bundle with a 6.8 MB source map, in case the size of the script
    the debugger takes on matters here.

  2. datho7561 commented on Sep 24, 2026

    @datho7561
    Contributor

    After the update to 1.139.0, this happens every single time instead of intermittently. As a result, I've downgraded to 1.138.0.

    (adding since the other issue where I said this was closed as a duplicate)

  3. bencefr commented on Sep 25, 2026

    @bencefr
  4. cesaryuan commented on Sep 26, 2026

    @cesaryuan
    Contributor

    Same here. After updating to 1.139, debugging has stopped working completely.

  5. krissrex commented on Sep 29, 2026

    @krissrex

    Confirmed that localhost=ipv6 is the issue in 1.139.0. We need an update of jsdebug with microsoft/vscode-js-debug#2417 in.

    Edit: Seems fixed in 1.140 since it pulls in the new vscode-js-debug extension, which fixes the localhost ipv6 issue.

    Old workaround

    I got opus to generate a workaround for now:

    tasks.json:

    {
        "version": "2.0.0",
        "tasks": [
            {
             // ... your pre-existing task here
                "label": "Build all extensions"
            },
            {
                "label": "Inspector IPv6 bridge",
                "type": "shell",
                "command": "node \"${workspaceFolder}/.vscode/inspector-ipv6-bridge.js\"",
                "isBackground": true,
                "presentation": {
                    "reveal": "never"
                },
                "problemMatcher": {
                    "owner": "inspector-ipv6-bridge",
                    "pattern": { "regexp": "^__no_match__$" },
                    "background": {
                        "activeBegin": true,
                        "beginsPattern": "^bridge starting",
                        "endsPattern": "^bridge ready"
                    }
                }
            },
            {
                "label": "Build all extensions + IPv6 bridge",
                "dependsOn": ["Build all extensions", "Inspector IPv6 bridge"]
            }
        ]
    }

    launch.json:

    {
        "version": "0.2.0",
        "configurations": [
            {
                // Workaround for VS Code 1.139.1, where js-debug cannot attach to the
                // extension host over IPv6. See .vscode/inspector-ipv6-bridge.js.
                "name": "Run All Extensions (IPv6 bridge)",
                "type": "extensionHost",
                "request": "launch",
                "runtimeExecutable": "${execPath}",
                "args": [
                    "--extensionDevelopmentPath=${workspaceFolder}/my-cool-extension",
                ],
                "outFiles": [
                    "${workspaceFolder}/my-cool-extension/dist/**/*.js"
                ],
                "skipFiles": ["<node_internals>/**.js", "**/node_modules/**", "**/app/out/vs/**"],
                "sourceMaps": true,
                "preLaunchTask": "Build all extensions + IPv6 bridge"
            }
        ]
    }

    .vscode/inspector-ipv6-bridge.js:

    // Workaround for VS Code 1.139.1: the extension host inspector listens on
    // 127.0.0.1 only, but js-debug connects to localhost, which resolves to ::1.
    // This script forwards [::1]:<port> to 127.0.0.1:<port> for each extension
    // host that VS Code starts with --inspect(-brk)=127.0.0.1:<port>.
    const { execFile } = require('child_process');
    const net = require('net');
    
    const INSPECT_FLAG = /--inspect(?:-brk)?=127\.0\.0\.1:(\d+)/;
    const bridges = new Map();
    
    function openBridge(port) {
        const server = net.createServer(client => {
            const target = net.connect({ host: '127.0.0.1', port });
            client.pipe(target).pipe(client);
            client.on('error', () => target.destroy());
            target.on('error', () => client.destroy());
        });
        server.on('error', err => console.log(`bridge ${port}: ${err.code}`));
        server.listen({ host: '::1', port }, () => console.log(`bridge [::1]:${port} -> 127.0.0.1:${port}`));
        bridges.set(port, server);
    }
    
    function scan() {
        execFile('ps', ['-axo', 'command='], { maxBuffer: 16 * 1024 * 1024 }, (err, stdout) => {
            if (err) return;
            const ports = new Set();
            for (const line of stdout.split('\n')) {
                if (!line.includes('node.mojom.NodeService')) continue;
                const match = INSPECT_FLAG.exec(line);
                if (match) ports.add(Number(match[1]));
            }
            for (const port of ports) {
                if (!bridges.has(port)) openBridge(port);
            }
            for (const [port, server] of bridges) {
                if (!ports.has(port)) {
                    server.close();
                    bridges.delete(port);
                    console.log(`bridge ${port}: closed`);
                }
            }
        });
    }
    
    console.log('bridge starting');
    setInterval(scan, 250);
    scan();
    console.log('bridge ready');
  6. WilliamSmithEdward commented on Sep 29, 2026

    @WilliamSmithEdward

    Connor Peet (@connor4312) Update? This is breaking extension developers. Thanks!

  7. added
    info-needed
    on Sep 29, 2026
  8. datho7561 commented on Sep 30, 2026

    @datho7561
    Contributor

    Please include a crash report https://github.com/microsoft/vscode/wiki/Native-Crash-Issues

    I tried this out, but given it was the extension host process crashing and not VS Code itself, no crash report was generated in the specified folder.

  9. vs-code-engineering commented on Oct 7, 2026

    @vs-code-engineering
    Contributor

    This issue has been closed as it has been labeled with info-needed and has not received the additional information that was requested from the issue author. It has been labeled as info-needed for 7 days.

  10. datho7561 commented on Oct 7, 2026

    @datho7561
    Contributor

    It seems that, as of 1.140.0 this was partially addressed, perhaps through #336233 (comment) . Now it's back to the 1.138.0 behaviour where it only occasionally crashes.

  11. WilliamSmithEdward commented on Oct 7, 2026

    @WilliamSmithEdward

    +1 Confirmed, still occurring on latest release build

  12. Qtax commented on Nov 21, 2026

    @Qtax

    Still happens on latest 1.147.

    The setting that William Smith (@WilliamSmithEdward) mentioned earlier actually resolved the issue for me:

    "debug.javascript.enableNetworkView": false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

info-needed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions