microsoft / microsoft/vscode

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

Open
#336,233 0 comments 0 reactions 1 assignee Claimed by @connor4312 View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

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

```

`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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.