microsoft / microsoft/vscode-cpptools
Unexpected Additional Terminal Output
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Environment
- OS and version: windows 10.0.19045
- VS Code: 1.95.3
- C/C++ extension: 1.22.11
- GDB / LLDB version: 14.1
Bug Summary and Steps to Reproduce
Bug Summary:
When executing a C++ program, in addition to the regular comments that are properly highlighted, the terminal occasionally outputs unexpected strings. These unexpected strings interfere with the program’s intended output, leading to confusion. Below is an example output:
PS D:\NL> & 'c:\Users\me\.vscode\extensions\ms-vscode.cpptools-1.22.11-win32-x64\debugAdapters\bin\WindowsDebugLauncher.exe' '--stdin=Microsoft-MIEngine-In-4hl3yf0d.as3' '--stdout=Microsoft-MIEngine-Out-rlow4555.xsz' '--stderr=Microsoft-MIEngine-Error-pioraos3.gvm' '--pid=Microsoft-MIEngine-Pid-chbaoneb.3ex' '--dbgExe=D:\msys64\ucrt64\bin\gdb.exe' '--interpreter=mi'
crosoft-MIEngine-Error-pioraos3.gvm' '--pid=Microsoft-MIEngine-Pid-chbaoneb.3ex' '--dbgExe=D:\x5cmsys64\x5cucrt64\x5cbin\x5cgdb.exe' '--interpreter=mi' ;96e10436-01ec-49c4-a7fa-b871c6e5d569Hello World
Debugger Configurations
task.json:
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: g++.exe build active file",
"command": "D:\\msys64\\ucrt64\\bin\\g++.exe",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}
launch.json:
{
"configurations": [
{
"name": "C/C++: g++.exe build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "D:\\msys64\\ucrt64\\bin\\gdb.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "Set Disassembly Flavor to Intel",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: g++.exe build active file"
}
],
"version": "2.0.0"
}
Debugger Logs
=thread-group-added,id="i1"
GNU gdb (GDB) 14.1
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-w64-mingw32".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
Warning: Debuggee TargetArchitecture not detected, assuming x86_64.
=cmd-param-changed,param="pagination",value="off"
[New Thread 12760.0x194]
[New Thread 12760.0x1484]
[New Thread 12760.0x614]
Thread 1 hit Breakpoint 1, main () at D:\NL\CS\cpp\whiteBoard\helloworld\test.cpp:8
8 cout << "Hello World" << endl;
Loaded 'C:\Windows\SYSTEM32\ntdll.dll'. Symbols loaded.
Loaded 'C:\Windows\System32\kernel32.dll'. Symbols loaded.
Loaded 'C:\Windows\System32\KernelBase.dll'. Symbols loaded.
Loaded 'C:\Windows\System32\ucrtbase.dll'. Symbols loaded.
Loaded 'D:\msys64\ucrt64\bin\libstdc++-6.dll'. Symbols loaded.
Loaded 'D:\msys64\ucrt64\bin\libgcc_s_seh-1.dll'. Symbols loaded.
Loaded 'D:\msys64\ucrt64\bin\libwinpthread-1.dll'. Symbols loaded.
Loaded 'C:\Windows\System32\advapi32.dll'. Symbols loaded.
Loaded 'C:\Windows\System32\msvcrt.dll'. Symbols loaded.
Loaded 'C:\Windows\System32\sechost.dll'. Symbols loaded.
Loaded 'C:\Windows\System32\rpcrt4.dll'. Symbols loaded.
Loaded 'C:\Windows\System32\bcrypt.dll'. Symbols loaded.
Loaded 'C:\Windows\SYSTEM32\cryptbase.dll'. Symbols loaded.
Loaded 'C:\Windows\System32\bcryptprimitives.dll'. Symbols loaded.
[Thread 12760.0x614 exited with code 0]
[Thread 12760.0x1484 exited with code 0]
[Thread 12760.0x194 exited with code 0]
[Inferior 1 (process 12760) exited normally]
The program 'D:\NL\CS\cpp\whiteBoard\helloworld\test.exe' has exited with code 0 (0x00000000).
Other Extensions
No response
Additional Information
The issue appears inconsistently:
-
Sometimes, the terminal does not show this abnormal output at all, and old abnormal output in the terminal disappears entirely.
-
Other times, this abnormal output appears after the normal program output (e.g., "Hello World"). In such cases, the program output seems to overwrite portions of the abnormal output, like so:
PS D:\NL> & 'c:\Users\me\.vscode\extensions\ms-vscode.cpptools-1.22.11-win32-x64\debugAdapters\bin\WindowsDebugLauncher.exe' '--stdin=Microsoft-MIEngine-In-4hl3yf0d.as3' '--stdout=Microsoft-MIEngine-Out-rlow4555.xsz' '--stderr=Microsoft-MIEngine-Error-pioraos3.gvm' '--pid=Microsoft-MIEngine-Pid-chbaoneb.3ex' '--dbgExe=D:\msys64\ucrt64\bin\gdb.exe' '--interpreter=mi'
Hello Worldngine-Error-pioraos3.gvm' '--pid=Microsoft-MIEngine-Pid-chbaoneb.3ex' '--dbgExe=D:\x5cmsys64\x5cucrt64\x5cbin\x5cgdb.exe' '--interpreter=mi' ;96e10436-01ec-49c4-a7fa-b871c6e5d569
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the intermittent output using the shown task.json and launch.json with VS Code 1.95.3, the C/C++ extension, GDB 14.1, and Windows 10. Start by comparing the debug launcher command output with the program output and debugger logs. Done means identifying and preventing the launcher or debugger arguments from appearing in the terminal while preserving the program's normal output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, vscode
- Domain
- devtools, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100