microsoft / microsoft/vscode-cpptools
[cppvsdbg] Allow stdin to the debuggee
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Type: Debugger
Describe the bug
- OS and Version: Windows 10 (1903)
- VS Code Version: 1.39.2
- C/C++ Extension Version: 0.26.1
- Other extensions you installed: CMake Tools (1.2.1)
- A clear and concise description of what the bug is.
When launching the console debugger, COUT text is displayed correctly. CIN input is not passed to the program.
To Reproduce
launch.json:
launch.json.txt
main.cpp:
main.cpp.txt
Debug console output...
Loaded 'D:\Users\micro\Desktop\workspace\ITP365\itp365_20201_hw01\build\main.exe'. Symbols loaded.
Loaded 'C:\Windows\System32\ntdll.dll'. Cannot find or open the PDB file.
Loaded 'C:\Windows\System32\kernel32.dll'. Cannot find or open the PDB file.
Loaded 'C:\Windows\System32\KernelBase.dll'. Cannot find or open the PDB file.
Loaded 'C:\Windows\System32\msvcp140d.dll'. Cannot find or open the PDB file.
Loaded 'C:\Windows\System32\vcruntime140d.dll'. Cannot find or open the PDB file.
Loaded 'C:\Windows\System32\ucrtbased.dll'. Cannot find or open the PDB file.
The thread 11604 has exited with code 0 (0x0).
Please select...
1. Encrypt
2. Decrypt
?. Quit
1
2
The thread 32696 has exited with code 0 (0x0).
The thread 18488 has exited with code 0 (0x0).
The program '[4716] main.exe' has exited with code 0 (0x0).
Additional context
I'm teaching a C++ data structures class in January. I'd really like to use VSCode (instead of VS and XCode). But I need local debugging working.
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 issue with the attached launch.json and main.cpp on Windows 10, then inspect the cppvsdbg console input path. Confirm that input entered during a console debugging session reaches the debuggee's cin; done when the sample program receives and processes stdin instead of exiting without it.
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
- Mostly clear
- Newbie friendliness
- 35/100