vscode-cpptools
vscode-cpptools copied to clipboard
Get trash file after debug the multi-files c++ code
Environment
- OS and version: Windows_NT x64 10.0.22000
- VS Code: 1.69.2(user setup)
- C/C++ extension: C/C++ v1.12.0, C/C++ Extension Pack v1.2.0
- OS and version of remote machine (if applicable): Windows11
Bug Summary and Steps to Reproduce
Bug Summary: Get trash file in debugging process.
Steps to Reproduce:
- Using ssh to the lab sever(linux), and debug the c++ code using gdb.
- Here is my setting in .vscode folder
- c_cpp_properties.json
{
"configurations": [
{
"name": "Linux",
"includePath": [
"${workspaceFolder}"
],
"defines": [],
"compilerPath": "/usr/local/bin/gcc",
"cppStandard": "c++11",
"intelliSenseMode": "linux-gcc-x64"
}
],
"version": 4
}
- settings.json
{
"makefile.extensionOutputFolder": "./.vscode",
"files.associations": {
"iosfwd": "cpp",
"iostream": "cpp",
"ostream": "cpp"
}
}
- task.json
{
"version": "2.0.0",
"tasks": [
{
"type": "shell",
"label": "C/C++: g++ build active file",
"command": "make",
"args": [],
"options": {
"cwd": "${fileDirname}"
},
}
],
}
- 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": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "/usr/bin/gdb",
"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++ build active file"
}
]
}
-
In the process of debugging, I got a garbage file(not created by me), and the content is the picture below:
-
Here is the extension installed in the vscode
Other Extensions
No other extension
Additional Information
Thanks~
Do you repro the issue with 1.11.4 too?
Does a new trash file get created every time you start debugging? How do the name of the files change?
Both release and pre-realease version generate trash file everytime, both the filename and the content are all the same as the picture I provided.
You mean the file is always named "2"? So there's only ever 1 trash file existing at a time or do they accumulate somehow?
I delete the trash file every time, and it just keeps generating it everytime I debug it. Yes, the filename is "2", and the content is shown above.
I don't repro the issue. Are you able to repro it without building with a makefile?
This issue has been closed because it needs more information and has not had recent activity.