Output settings to debug console in Visual Studio Code

When I tried to create a Java debug environment with vscode, the execution result could not be displayed on the debug console and I stumbled considerably, so I will write it.

Build & debug debug environment

First, install the JDK and extensions while referring to the appropriate site. Then I created a Java file for testing and wrote a simple code to display the string in the debug console. alt At the site I was referring to, when I started debugging at this stage, the execution result was displayed on the debug console, but a problem occurred here. For some reason, I don't see the string "hello world" in the debug console. Even if I reinstall the JDK, re-install the extension, or recreate the file, it doesn't appear at all ... alt

Solution

No matter what word I searched for, I couldn't find a solution, and when a month passed, I suddenly came up with the idea, "By the way, isn't there an output setting to the debug console?" Immediately, when I enter "Debug Console" in the search window of the setting alt I found a setting item for those atmospheres. I don't understand well in English, so when I ask Google teacher

The specified console for launching Java programs. If you want to customize the console for a particular debug session, change the console settings in launch.json.

It's hard to understand the translation, but it probably means "If you want to change the location where the program execution result is displayed, change this setting". So, I changed the setting from * integratedTerminal *, which was selected as the default, to * internalConsole *. And when I try debugging ... alt The execution result is displayed firmly on the debug console. Apparently, with the default settings, the output destination of the execution result was the terminal.

At the end

If you have any trouble with vscode etc., first try to find out if there is such an item in the setting of the software itself. It may be a surprisingly simple setting mistake like this time.

Recommended Posts

Output settings to debug console in Visual Studio Code
Java in Visual Studio Code
[Mac] Install Java in Visual Studio Code
Add --enable-preview option in Java in Visual Studio Code
Java.home cannot be set in visual studio code.
[Mac] Install Java in Visual Studio Code (VS Code)
To debug in eclipse
I couldn't type Japanese in Ubuntu20.04 + Visual Studio Code
Try to quit Eclipse and switch to Visual Studio Code
Output JaCoCo coverage to console
Use PlantUML with Visual Studio Code
How to use PlantUML with Visual Studio Code (created on October 30, 2020)
Log output to file in Java
I got the error The java.home variable defined in Visual Studio Code settings points to a missing or inaccessible folder (C: avadk-13.0.1)
[For beginners] Introducing the procedure to Hello, World in C/C ++ language using Visual Studio Code on Ubuntu
Enable log output to both file and console using log4j in Eclipse.
Farewell to Eclipse, Visual Studio Code for moderately lightweight JavaFX development-Environment construction-
How to debug the processing in the Ruby on Rails model only on the console
Try remote debugging of Java with Remote Containers in Visual Studio Code Insiders
Settings related to connection pool in Tomcat.jdbc
Ruby on Rails in Visual Studio Codespaces
How to output Java string to console screen
Java to C and C to Java in Android Studio
Tomcat, Context, debug settings in IntelliJ Community
[For beginners] How to debug in Eclipse
How to use ExpandableListView in Android Studio
View used to execute Java code during debugging in Eclipse is Debug Shell
Code that is difficult to debug and parse
Experience .NET 5 with Docker and Visual Studio Code
Riot (chat app) development (settings) in Android Studio
(Memo) How to solve dummy output in Ubuntu 20.04
Demo code to recursively search directories in Files.walkFileTree
3 ways to import the library in Android Studio
Code to escape a JSON string in Java
Settings to display Japanese Javadoc in IntelliJ IDEA
I tried to output multiplication table in Java