Skip to content

Commit dadc154

Browse files
fix(devtools): detect VS Code renamed macOS binary in launch-editor (#93971)
### What? Add the new VS Code macOS binary name (`Code`) to the `COMMON_EDITORS_MACOS` detection map in `launch-editor.ts`, alongside the legacy `Electron` entry. Same for VS Code Insiders (`Code - Insiders`). ### Why? VS Code renamed its macOS binary from `Electron` to `Code`. The `guessEditor()` function detects running editors by matching `ps x` output against known process paths. Since the old key (`…/MacOS/Electron`) no longer appears in the process list, VS Code is not detected — the "open in editor" button silently does nothing. ### How? Added two new entries to `COMMON_EDITORS_MACOS` that map the renamed binaries to the same `code` CLI path. The old entries are kept for backward compatibility. <!-- NEXT_JS_LLM_PR -->
1 parent cdd77ac commit dadc154

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

packages/next/src/next-devtools/server/launch-editor.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,12 @@ const COMMON_EDITORS_MACOS = {
6161
'/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl',
6262
'/Applications/Visual Studio Code.app/Contents/MacOS/Electron':
6363
'/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code',
64+
'/Applications/Visual Studio Code.app/Contents/MacOS/Code':
65+
'/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code',
6466
'/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Electron':
6567
'/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/bin/code',
68+
'/Applications/Visual Studio Code - Insiders.app/Contents/MacOS/Code - Insiders':
69+
'/Applications/Visual Studio Code - Insiders.app/Contents/Resources/app/bin/code',
6670
'/Applications/VSCodium.app/Contents/MacOS/Electron':
6771
'/Applications/VSCodium.app/Contents/Resources/app/bin/code',
6872
'/Applications/AppCode.app/Contents/MacOS/appcode':

0 commit comments

Comments
 (0)