microsoft / microsoft/vscode-cpptools

MSVC Debug error: Windows cannot find 'C:\Program'. Make sure you typed the name correctly, and then try again

Aperta
#10,946 1 commento 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

bug debugger
Lingua principale
TypeScript
Stelle
6.2k
Fork
1.7k
Merge medio
14h 46m
PR unite (30g)
61

Descrizione

Environment
  • OS and version: Windows 10 21H2
  • VS Code: 1.78.2
  • C/C++ extension: 1.15.4
  • OS and version of remote machine (if applicable):
  • GDB / LLDB version: MSVC 2022,2019,2017,...2005 All versions installed on dev station.
Bug Summary and Steps to Reproduce

Bug Summary:
Debugger fails to start on Windows with Visual studio 2005-2022

Steps to reproduce:
follow the procedure from https://code.visualstudio.com/docs/cpp/config-msvc
at the step where the debug is excepted to launch in debug, it will pop an error window with,
Logo X in red circle
Title: C:\Program
Message: Windows cannot find 'C:\Program'. Make sure you typed the name correctly, and then try again
Buttons: Ok

Debugger Configurations
task.json:
{
  "tasks": [
    {
      "type": "cppbuild",
      "label": "C/C++: cl.exe build active file",
      "command": "cl.exe",
      "args": [
        "/Zi",
        "/EHsc",
        "/nologo",
        "/Fe${fileDirname}\\${fileBasenameNoExtension}.exe",
        "${file}"
      ],
      "options": {
        "cwd": "${fileDirname}"
      },
      "problemMatcher": [
        "$msCompile"
      ],
      "group": {
        "kind": "build",
        "isDefault": true
      },
      "detail": "Task generated by Debugger."
    }
  ],
  "version": "2.0.0"
}
launch.json
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(Windows) Launch",
            "type": "cppvsdbg",
            "request": "launch",
            "program": "${workspaceFolder}/helloworld.exe",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "console": "externalTerminal"
        }

    ]
}
Debugger Logs
No logs generated
Other Extensions

No response

Additional Information

This issue started at version 1.2.0, if I rollback to version 1.1.3, the debugger works as expected with msvc when starting from the vscode from the corresponding developer command prompt for VSXXXX

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia con le configurazioni task.json e launch.json mostrate nel report, quindi riproduci il problema seguendo la procedura di configurazione MSVC collegata dal prompt dei comandi per sviluppatori Visual Studio appropriato. Confronta il comportamento tra le versioni dell’estensione 1.2.0 e 1.1.3; l’attività è completata quando il debugger si avvia senza il Windows C:\Program error usando le configurazioni MSVC riportate.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
cpp, typescript, vscode
Ambito
devtools
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.