microsoft / microsoft/vscode-cpptools

VSDebugConsole.exe tries to access non-existent path as its starting directory.

Offen
#11,972 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug debugger help wanted Language Service
Vorherrschende Sprache
TypeScript
Sterne
6.2k
Forks
1.7k
Ø Merge
14 Std. 46 Min.
Gemergte PRs (30 T.)
61

Beschreibung

Environment
  • OS and version: Windows 10 22H2 (Build 19045.3930)
  • VS Code: Version: 1.86.1 (user setup) Commit: 31c37ee8f63491495ac4
  • C/C++ extension: 1.18.5
Bug Summary and Steps to Reproduce

Bug Summary:
VsDebugConsole.exe tries to access non-existent starting directory upon debugger launch and fails debugging session. It was working fine, I didn't do any configuration changes. But I applied regular vscode updates when these are appeared. For a while, I didn't debug the program , I was busy only with developing the code. therefore, I can't tell after which update this problem caused. I attached the screenshot about this error message. as you can see vsdebugconsole.exe tries to access "%HOMEPATH%\AppData\Local\Programs\Microsoft VS Code\wt" which is non-exist.

I've solved the problem with simply creating a directory named "wt" under VS code installation directory but why that problem has happened?

What the "wt" is? Why debugger tries to set it as starting directory? And why that is not exist?

Steps to reproduce:
There is no fancy steps. I just open vscode, press f5 and the problem occurs.

Debugger Configurations
Tasks.json
{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "build",
            "type": "shell",
            "command": "msbuild",
            "args": [
                // Ask msbuild to generate full paths for file names.
                "/property:GenerateFullPaths=true",
                "/t:build",
                // Do not generate summary otherwise it leads to duplicate errors in Problems panel
                "/consoleloggerparameters:NoSummary"
            ],
            "group": "build",
            "presentation": {
                // Reveal the output only if unrecognized errors occur.
                "reveal": "silent"
            },
            // Use the standard MS compiler pattern to detect errors, warnings and infos
            "problemMatcher": "$msCompile"
        }
    ]
}


launch.json
{
    "version": "0.2.0",
    "configurations": [
            {
            "logging": {
                "engineLogging": true
            },
            "name": "Lan server",
            "type": "cppvsdbg",
            "request": "launch",
            "program": "${workspaceFolder}/build/bin/radium.exe",
            "args": ["-dist",":2077","server"],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": true
        }
    ]
}
Debugger Logs
-> (C) {"seq":74,"type":"request","command":"runInTerminal","arguments":{"kind":"external","title":"D:\\dev\\sources\\internal\\radium\\build\\bin\\radium.exe","cwd":"","args":["c:\\Users\\Ozzy\\.vscode\\extensions\\ms-vscode.cpptools-1.18.5-win32-x64\\debugAdapters\\vsdbg\\bin\\VsDebugConsole.exe","\\\\.\\pipe\\Microsoft-VisualStudio-Debug-Console-{56883303-9989-426B-AB00-AF1DB430C1CE}","Local\\{56883303-9989-426B-AB00-AF1DB430C1CE}","/AutoExit"]}}
-> (C) {"type":"response","seq":15,"command":"runInTerminal","request_seq":74,"success":true,"body":{}}
<- (E) {"seq":77,"type":"event","event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/VsDebugConsoleStartFailure","data":{"VS.Diagnostics.Debugger.vsdbg.OSFamily":"Windows","VS.Diagnostics.Debugger.vsdbg.Version":"17.8.10929.2 commit:f5957dcef136d5225d2eb95e5eca6b39d3785bf9","VS.Diagnostics.Debugger.vsdbg.WindowsVersion":"10.0.19045","VS.Diagnostics.Debugger.VsDebugConsoleStartFailure.Code":-2147023436,"VS.Diagnostics.Debugger.VsDebugConsoleStartFailure.Operation":"InitializeDebugConsole"}}}
<- (E) {"seq":79,"type":"event","event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/vsdbg/LaunchFailed","data":{"VS.Diagnostics.Debugger.vsdbg.OSFamily":"Windows","VS.Diagnostics.Debugger.vsdbg.Version":"17.8.10929.2 commit:f5957dcef136d5225d2eb95e5eca6b39d3785bf9","VS.Diagnostics.Debugger.vsdbg.WindowsVersion":"10.0.19045","VS.Diagnostics.Debugger.vsdbg.ErrorCode":-1842151309}}}
<- (E) {"seq":81,"type":"event","event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/vsdbg/CommandFailed","data":{"VS.Diagnostics.Debugger.vsdbg.OSFamily":"Windows","VS.Diagnostics.Debugger.vsdbg.Version":"17.8.10929.2 commit:f5957dcef136d5225d2eb95e5eca6b39d3785bf9","VS.Diagnostics.Debugger.vsdbg.WindowsVersion":"10.0.19045","VS.Diagnostics.Debugger.vsdbg.Command":"configurationDone","VS.Diagnostics.Debugger.vsdbg.ErrorCode":-1842151309,"VS.Diagnostics.Debugger.vsdbg.AdapterId":"cppvsdbg"}}}
<- (R) {"seq":83,"type":"response","request_seq":14,"success":false,"command":"configurationDone","message":"Unable to start program 'D:\\dev\\sources\\internal\\radium\\build\\bin\\radium.exe'. Unable to start the Microsoft Visual Studio Debug Console."}
-> (C) {"command":"disconnect","arguments":{"restart":false},"type":"request","seq":16}
<- (E) {"seq":86,"type":"event","event":"output","body":{"category":"telemetry","output":"VS/Diagnostics/Debugger/vsdbg/DebugCompleted","data":{"VS.Diagnostics.Debugger.vsdbg.OSFamily":"Windows","VS.Diagnostics.Debugger.vsdbg.Version":"17.8.10929.2 commit:f5957dcef136d5225d2eb95e5eca6b39d3785bf9","VS.Diagnostics.Debugger.vsdbg.WindowsVersion":"10.0.19045","VS.Diagnostics.Debugger.vsdbg.DebugCompleted.BreakCounter":0,"VS.Diagnostics.Debugger.vsdbg.AdapterId":"cppvsdbg"}}}
<- (R) {"seq":88,"type":"response","request_seq":16,"success":true,"command":"disconnect"}
Other Extensions

No response

Additional Information

image

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Überprüfe die Konfigurationen von launch.json und tasks.json und reproduziere anschließend den Fehler, indem du unter Windows 10 F5 drückst. Beginne mit dem runInTerminal-Protokoll und den Startdetails von VsDebugConsole.exe, einschließlich des leeren cwd und des gemeldeten Pfads, und bestätige, dass eine Debugsitzung ohne den Fehler bezüglich des nicht vorhandenen Verzeichnisses startet.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
cpp, typescript
Bereich
devtools
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.