AI & Agent Dev Bug Sandbox logo
AI & Agent Dev Bug Sandbox
Back to Radar

VSCodium Not Detected On MacOS When Clicking Error Overlay Links

The Next.js error overlay fails to open VSCodium on macOS because launch-editor uses an outdated Electron binary path and lacks a codium case for line/column arguments.

mediumConfidence 85%Next.jsAffected V16.3.0-Canary.28

Origin Analysis

The launch-editor package's guessEditor function checks for /Applications/VSCodium.app/Contents/MacOS/Electron, which does not exist; the actual executable is VSCodium. Additionally, getArgumentsForLineNumber has no case for the VSCodium binary name, so it cannot pass --goto file:line:column.
1. Clone the reproduction repository: https://github.com/pipe1os/nextjs-vscodium-repro 2. Install dependencies and start dev server (npm run dev). 3. Open http://localhost:3000 in a browser. 4. Wait for the deliberate runtime error to appear. 5. Click the file path link inside the error overlay. 6. Observe that VSCodium either fails to launch or opens without navigating to the error line/column.

Fixing Code Block

const fs = require('fs') const path = require('path') const launchEditor = require('launch-editor') const originalGuessEditor = launchEditor.guessEditor const originalGetArgumentsForLineNumber = launchEditor.getArgumentsForLineNumber launchEditor.guessEditor = function () { if (process.platform !== 'darwin') { return originalGuessEditor() } const vscodiumPath = '/Applications/VSCodium.app/Contents/MacOS/VSCodium' if (fs.existsSync(vscodiumPath)) { return { name: 'VSCodium', path: vscodiumPath, arguments: [], displayName: 'VSCodium' } } return originalGuessEditor() } launchEditor.getArgumentsForLineNumber = function (editor, file, line, column) { const base = path.basename(editor.path).toLowerCase() if (base === 'vscodium' || base === 'codium') { return ['--reuse-window', '--goto', file + ':' + line + ':' + column] } return originalGetArgumentsForLineNumber(editor, file, line, column) }
The hotfix monkey-patches launch-editor to detect the correct VSCodium executable path and to return the proper arguments (--reuse-window and --goto with file:line:column) when the editor binary is VSCodium.

Edge Case Audit

This patch modifies the launch-editor package at runtime and must be loaded before the first error overlay link is clicked. It will be lost if the dependency is reinstalled unless preserved with patch-package or similar. The hardcoded VSCodium path may fail for custom installations. To roll back, remove the monkey-patch and restore the original functions.

Ecosystem Topology