Open sjd-home opened 3 months ago
Related on Stack Overflow: https://stackoverflow.com/q/78914016/11107541
@starball5 What version of the C/C++ extension are you using? Do you have other extensions installed that could be creating that file? Is the file always named 2? If you create your own file named 2, are the contents overwritten?
(note: this is not an issue I'm experiencing. I just directed @sjd-home here from SO)
Oh, yeah, I intended to message the original issue creator @sjd-home .
Thanks guys.
I am using: Microsoft C/C++ v1.21.6 Microsoft C/C++ Extension Pack v1.3.0 Microsoft C/C++ Themes v2.0.0
I do have a bunch of other extensions too - for Python, Code Spell Checker, etc. I don't think they are anything to do with it.
As @starball5 said on the StackOverflow link, I also believe it is probably to do with stream redirection when launching the program.
My code is built and run on Linux machine, and debugged with VS Code running over SSH onto that machine. For reasons beyond my control, the machine is using "CentOS Linux 7 (Core)" and I am using csh by default.
I wondered whether it was some how messing up the Linux stream redirection "2>&1" as is commonly used? I'm not sure if this redirection works in csh (should it be >&)?
The file is always called 2. The contents are -e c 1
(rendered as "-e ESCc1" in VS Code).
If the file exists already (I made my own with the contents "Hello world!") the file gets overwritten with -e c 1
.
Environment
Version: 1.85.2 (user setup) Commit: 8b3775030ed1a69b13e4f4c628c612102e30a681 Date: 2024-01-18T06:40:10.514Z Electron: 25.9.7 ElectronBuildId: 26354273 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Windows_NT x64 10.0.19045
Bug Summary and Steps to Reproduce
Create C program Run C program with debugger A file called "2" is generated in working directory. The file contents appear to be some sort of escape code.
Note, I am running VS Code on PC, and SSH into Linux server. The program is compiling on Linux server, using gcc. When debugging with VS Code, a file called "2" is created in the working directory (sometimes multiple places).
Debugger Configurations
Debugger Logs
Other Extensions
Microsoft C/C++
Additional Information
No response