microsoft / microsoft/vscode-cpptools

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

Open
#11,972 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug debugger help wanted Language Service
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the launch.json and tasks.json configurations, then reproduce the failure by pressing F5 on Windows 10. Start with the runInTerminal log and the VsDebugConsole.exe launch details, including the empty cwd and reported path, and confirm that a debugging session starts without the non-existent-directory error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, typescript
Domain
devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.