0
  • VS Code Version:
    Version: 1.103.2 (user setup)
    Commit: 6f17636121051a53c88d3e605c491d22af2ba755
    Date: 2025-08-20T16:45:34.255Z
    Electron: 37.2.3
    ElectronBuildId: 12035395
    Chromium: 138.0.7204.100
    Node.js: 22.17.0
    V8: 13.8.500258-electron.0
    OS: Windows_NT x64 10.0.19045

Steps to Reproduce:
a simple rust program to produce the bug

use std::env;
use std::process::Command;

fn main() {
    let args: Vec<String> = env::args().collect();

    if args.len() < 2 {
        println!("Usage: {} <file_path> [additional args...]", args[0]);
        return;
    }

    let vsc_exe = "D:\\Program Files\\Microsoft VS Code\\Code.exe";

    let output = Command::new(vsc_exe).args(&args[1..]).output();

    match output {
        Ok(_) => println!("Successfully launched VS Code with provided args"),
        Err(e) => println!("Launch failed: {}", e),
    }
}

launcher.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "vsc_process",
            "type": "cppvsdbg",
            "request": "launch",
            "program": "${workspaceFolder}/target/debug/vsc_process.exe",
            "args": ["${workspaceFolder}/.vscode/launch.json"],
            "stopAtEntry": false,
            "cwd": "${fileDirname}",
            "environment": [],
            "console": "integratedTerminal"
        }        
    ]
}

boot from debug and vscode will not do anything, boot from cmd is ok.

golang as the same

package main

import (
    "fmt"
    "os"
    "os/exec"
)

func main() {
    args := os.Args

    if len(args) < 2 {
        fmt.Printf("Usage: %s <file_path> [additional args...]\n", args[0])
        return
    }

    vscExe := "D:\\Program Files\\Microsoft VS Code\\Code.exe"

    cmd := exec.Command(vscExe, args[1:]...)
    err := cmd.Run()

    if err != nil {
        fmt.Printf("Launch failed: %v\n", err)
    } else {
        fmt.Println("Successfully launched VS Code with provided args")
    }
}

launcher.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "Launch Package",
            "type": "go",
            "request": "launch",
            "mode": "auto",
            "program": "${workspaceFolder}/main.go",
            "args": ["${workspaceFolder}/.vscode/launch.json"],
        }
    ]
}

This is used in unreal jump to source:
https://github.com/EpicGames/UnrealEngine/blob/6978b63c8951e57d97048d8424a0bebd637dde1d/Engine/Plugins/Developer/VisualStudioCodeSourceCodeAccess/Source/VisualStudioCodeSourceCodeAccess/Private/VisualStudioCodeSourceCodeAccessor.cpp#L236

According to original issue: https://github.com/microsoft/vscode/issues/264119#issuecomment-3246398555

I've tried ELECTRON_RUN_AS_NODE and still not working. Setting ELECTRON_RUN_AS_NODE to 0 or 1 even blocks vscode from booting.

I think this is a bug not a settings problem.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.