Repository: vscode
Issue: [wsl] Crash when launching from wsl with `--verbose`
Labels: bug,WSL

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes/No

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version:  1.79.2 695af097c7bd098fbf017ce3ac85e09bbc5dda06
- OS Version: Win 11 22H2 (222621.1928), Ubuntu 23.04 inside WSLv1

Steps to Reproduce:
1. Inside WSL (v1), run `code --verbose`.
2. Different error dialogs appear:

```
[Window Title]
Error

[Main Instruction]
A JavaScript error occurred in the main process

[Content]
Uncaught Exception:
Error: EPIPE: broken pipe, write
    at Socket._write (node:internal/net:55:25)
    at writeOrBuffer (node:internal/streams/writable:391:12)
    at _write (node:internal/streams/writable:332:10)
    at Writable.write (node:internal/streams/writable:336:10)
    at console.value (node:internal/console/constructor:299:16)
    at console.log (node:internal/console/constructor:376:26)
    at I.trace (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:42:2804)
    at c.trace (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:42:4795)
    at r.trace (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:42:49426)
    at t.z (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:42:13992)
    at C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:42:13760
    at r.i (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:42:39712)
    at C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:37:14194
    at p.invoke (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:19:145)
    at a.deliver (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:19:2125)
    at s.fire (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:19:1733)
    at P.j (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:37:23351)
    at P.watch (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:37:22530)
    at r.watch (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:37:14501)
    at t.w (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:42:13918)
    at C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:42:13630
    at s.queue (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:21:12737)
    at C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:21:14061
    at C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:21:13671

[OK]
```

```
[Window Title]
Error

[Main Instruction]
A JavaScript error occurred in the main process

[Content]
Uncaught Exception:
Error: EPIPE: broken pipe, write
    at Socket._write (node:internal/net:55:25)
    at writeOrBuffer (node:internal/streams/writable:391:12)
    at _write (node:internal/streams/writable:332:10)
    at Writable.write (node:internal/streams/writable:336:10)
    at console.value (node:internal/console/constructor:299:16)
    at console.log (node:internal/console/constructor:376:26)
    at I.trace (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:42:2804)
    at c.trace (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:42:4795)
    at r.trace (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:42:49426)
    at e.NativePolicyService.m (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:42:58955)
    at Object.<anonymous> (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:42:58825)

[OK]
```

```
[Window Title]
Error

[Main Instruction]
A JavaScript error occurred in the main process

[Content]
Uncaught Exception:
Error: EPIPE: broken pipe, write
    at Socket._write (node:internal/net:55:25)
    at writeOrBuffer (node:internal/streams/writable:391:12)
    at _write (node:internal/streams/writable:332:10)
    at Writable.write (node:internal/streams/writable:336:10)
    at console.value (node:internal/console/constructor:299:16)
    at console.log (node:internal/console/constructor:376:26)
    at I.trace (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:42:2804)
    at c.trace (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:42:4795)
    at r.trace (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:42:49426)
    at e.PolicyConfiguration.j (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:43:4362)
    at e.PolicyConfiguration.initialize (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:43:3503)
    at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Promise.all (index 1)
    at async w.initialize (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:43:6009)
    at async Promise.all (index 2)
    at async Object.C [as settled] (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:21:21411)
    at async Me.d (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:91:3894)
    at async Me.a (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:91:1193)

[OK]
```

```
[Window Title]
Error

[Main Instruction]
A JavaScript error occurred in the main process

[Content]
Uncaught Exception:
Error: EPIPE: broken pipe, write
    at Socket._write (node:internal/net:55:25)
    at writeOrBuffer (node:internal/streams/writable:391:12)
    at _write (node:internal/streams/writable:332:10)
    at Writable.write (node:internal/streams/writable:336:10)
    at console.value (node:internal/console/constructor:299:16)
    at console.log (node:internal/console/constructor:376:26)
    at I.trace (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:42:2804)
    at c.trace (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:42:4795)
    at r.trace (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:42:49426)
    at t.z (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:42:13992)
    at C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:42:13760
    at r.i (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:42:39712)
    at C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:37:14194
    at p.invoke (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:19:145)
    at a.deliver (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:19:2125)
    at s.fire (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:19:1733)
    at u.l (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:37:22922)
    at u.z (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:37:20866)
    at u.s (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:37:17696)
    at u.n (C:\Program Files\Microsoft VS Code\resources\app\out\vs\code\electron-main\main.js:37:16932)

[OK]
```

A window eventually opens, but shows another error message: "The window is not responding. You can reopen or close the window or keep waiting [Reopen] [Close] [Keep Waiting]"