Environment
- OS and version: Windows 10
- VS Code: 1.77.3
- C/C++ extension: v1.15.2
- OS and version of remote machine (if applicable): Ubuntu 22.04
- GDB / LLDB version: GNU gdb (Ubuntu 12.1-0ubuntu1~22.04) 12.1
Bug Summary and Steps to Reproduce
Bug Summary:
When use readline() and break(Shift + F5 or Ctrl + C) the program, terminal will not display inputs. (But still can execute commands).
Steps to reproduce:
- create
echo.c:
#include <stdio.h>
#include <readline/history.h>
#include <readline/readline.h>
int main() {
char* line = NULL;
while (line == NULL || strcmp(line, "q") != 0) {
line = readline("> ");
printf("%s\n", line);
}
return 0;
}
- Press
F5 to debug program.
- Press
Shift + F5 or Ctrl + C .
cppdbg terminal will not show inputs.
- Inputs will display normally if enter
q.
Debugger Configurations
launch.json:
{
"version": "0.2.0",
"configurations": [
{
"name": "(gdb) Launch",
"type": "cppdbg",
"request": "launch",
"program": "${workspaceFolder}/echo.out",
"cwd": "${workspaceFolder}",
"externalConsole": false,
"MIMode": "gdb",
"preLaunchTask": "gcc"
}
]
}
task.json:
```json
{
"version": "2.0.0",
"tasks": [
{
"label": "gcc",
"type": "shell",
"command": "gcc echo.c -g -lreadline -oecho.out"
}
]
}
### Debugger Logs
```shell
Maybe no needs.
Other Extensions
No response
Additional Information
No response
Environment
Bug Summary and Steps to Reproduce
Bug Summary:
When use
readline()and break(Shift + F5orCtrl + C) the program, terminal will not display inputs. (But still can execute commands).Steps to reproduce:
echo.c:F5to debug program.Shift + F5orCtrl + C.cppdbgterminal will not show inputs.q.Debugger Configurations
launch.json: { "version": "0.2.0", "configurations": [ { "name": "(gdb) Launch", "type": "cppdbg", "request": "launch", "program": "${workspaceFolder}/echo.out", "cwd": "${workspaceFolder}", "externalConsole": false, "MIMode": "gdb", "preLaunchTask": "gcc" } ] } task.json: ```json { "version": "2.0.0", "tasks": [ { "label": "gcc", "type": "shell", "command": "gcc echo.c -g -lreadline -oecho.out" } ] }Other Extensions
No response
Additional Information
No response