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.
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. 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 ...
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 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 ... 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.
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