microsoft / microsoft/vscode-cpptools
Unable to paste multiple lines to integrated terminal while debugging C++
Open
@browntarik is already working on this.
Since Apr 12, 2024.
debugger
help wanted
Language Service
more info needed
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Environment
- OS and version: Windows11 23H2
- VS Code:1.88.0
- C/C++ extension:1.19.9
- GDB / LLDB version:13.2
Bug Summary and Steps to Reproduce
Steps to Reproduce:
#include
using namespace std;
int main() {
char x;
cin >> x;
cout << "hello";
cout << "world";
cin >> x;
return 0;
}
If you add a breakpoint on the line cout << "hello" ;, step over does not work after pasting multiple lines to the terminal.
Debugger Configurations
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: g++.exe build active file",
"command": "D:\\application_code\\msys64\\mingw64\\bin\\g++.exe",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": "build",
"detail": "Task generated by Debugger."
},
],
"version": "2.0.0"
}
{
"version": "0.2.0",
"configurations": [
{
"name": " g++.exe ",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "d:\\application_code\\msys64\\mingw64\\bin\\gdb.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: g++.exe build active file",
},
]
}
Debugger Logs
1: (7091) <-1031-exec-next
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (7092) ->1031^running\r\n"},"seq":777}
1: (7092) ->1031^running
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (7092) ->*running,thread-id=\"all\"\r\n"},"seq":779}
1: (7092) ->*running,thread-id="all"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (7092) ->(gdb)\r\n"},"seq":781}
1: (7092) ->(gdb)
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (7093) 1031: elapsed time 1\r\n"},"seq":783}
1: (7093) 1031: elapsed time 1
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (7093) ->&\"\\n\"\r\n"},"seq":785}
1: (7093) ->&"\n"
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (7093) ->^done\r\n"},"seq":787}
1: (7093) ->^done
--> E (output): {"type":"event","event":"output","body":{"category":"console","output":"1: (7093) ->(gdb)\r\n"},"seq":789}
1: (7093) ->(gdb)
--> R (next-17): {"type":"response","request_seq":17,"success":true,"command":"next","body":{},"seq":791}
Other Extensions
No response
Additional Information
No response
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.
Assessment
This issue has not been assessed yet.