Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VSCode - Debuging/Launching using integrated Terminal instead Debug Console

Is there a way to use integrated Terminal for debugging/launching code instead of Debug Console in Visual Studio Code?

Currently, I'm using external console window for debugging code in VSCode, but it's not very convenient while debugging on full screen since it goes into background. The problem with the Debug Console is that it does not allow input, so my program is stuck if it requires any input and I don't use the external console.

Or, is there a way to feed intput into Debug Console?

EDIT: I'm trying to debug C++ code using Microsofts C++ plugin. Here is my launch.json:

{
        "name": "Debug",
        "type": "cppvsdbg",
        "request": "launch",
        "program": "${workspaceFolder}/bin/Debug/HelloWorld.exe",
        "args": [],
        "preLaunchTask": "Build",
        "stopAtEntry": false,
        "cwd": "${workspaceFolder}",
        "environment": [],
        "console": "integratedTerminal"
}
like image 632
Garzet Avatar asked Feb 21 '18 10:02

Garzet


People also ask

How do I start Debug console in VS Code?

Open the Debug view by selecting the Debugging icon on the left side menu. Select the green arrow at the top of the pane, next to . NET Core Launch (console). Other ways to start the program in debugging mode are by pressing F5 or choosing Run > Start Debugging from the menu.

Why is my debugger not working in VS Code?

The most common problem is that you did not set up launch.json or there is a syntax error in that file. Alternatively, you might need to open a folder, since no-folder debugging does not support launch configurations.

How do I change the integrated terminal in VS Code?

From the Command Palette (Ctrl+Shift+P), use the View: Toggle Terminal command.

How do I change debugger option just my code?

To enable or disable Just My Code in Visual Studio, under Tools > Options (or Debug > Options) > Debugging > General, select or deselect Enable Just My Code.


1 Answers

I managed to get no external console while debugging C++ files with the following option: "externalConsole": false within the debugger configuration in the launch.json file.

like image 69
Gerardo Galván Avatar answered Nov 15 '22 10:11

Gerardo Galván