Ctrl+D (EOF) in debug mode VSCode

Viewed 119
Version: 1.62.0
Commit: b3318bc0524af3d74034b8bb8a64df0ccf35549a
Date: 2021-11-04T20:38:29+02:00
Electron: 13.5.1
Chrome: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
ОС: Solus 4.3 Fortitude, Linux x64 5.14.16-204.current

There is a program written in D. In the loop, a string is fed to the input, read and further execution of the algorithm takes place. When running in normal mode, the program works without any problems.

enter image description here

When running in debug mode, I can't continue running the program because it hangs on the input process. I can't continue executing my code after pressing "Enter".

enter image description here

My launch.json:

"version": "0.2.0",
"configurations": [
    {
        "type": "gdb",
        "request": "launch",
        "name": "Launch Program",
        "target": "./lesson_2/bin/lesson_2",
        "cwd": "${workspaceRoot}",
        "valuesFormatting": "parseText"
    }
]

I tried to connect an external terminal, but it didn't work out. Did so:

"version": "0.2.0",
"configurations": [
    {
        "type": "gdb",
        "request": "launch",
        "name": "Launch Program",
        "target": "./lesson_2/bin/lesson_2",
        "cwd": "${workspaceRoot}",
        "valuesFormatting": "parseText",
        "console": "externalTerminal",
        "debugOptions": [
            "RedirectOutput"
        ]
    }
]

And that's it:

"version": "0.2.0",
"configurations": [
    {
        "type": "gdb",
        "request": "launch",
        "name": "Launch Program",
        "target": "./lesson_2/bin/lesson_2",
        "cwd": "${workspaceRoot}",
        "valuesFormatting": "parseText",
        "externalConsole": true
    }
]

I also tried adding this option, but nothing has changed:

"console": "integratedTerminal"

I use Native debug. In general, I don't know what to do. I ask for help.

0 Answers
Related