I just installed vscode along with the coding pack for Java from the vscode website, and whenever I run a Java program, it prints two extra lines in the terminal, one with a "^C" and another one that’s blank.
I’ve tried messing around with uninstalling the default java extensions and changing some of the settings but I can’t get it to go away. Any help?
2
Answers
Try these solutions:
with the execution of your code. You can check these settings in VS
Code:
"java.debug.settings.hotCodeReplace" and see if changing them affects
the behavior.
to auto execute, try disabling them temporarily to see if the issue
goes away:
Review the run configuration to ensure that it’s not causing the
extra output:
In VS Code, go to the Run and Debug view (Ctrl+Shift+D or Cmd+Shift+D
on Mac)
Check your launch configurations and make sure there are no
additional tasks or settings that might be affecting the execution.
behaviors that cause extra output. Check your terminal settings:
configurations.
Code: Go to the Extensions view (Ctrl+Shift+X or Cmd+Shift+X on Mac).
Java, Java Test Runner).
output or termination of the Java program.
uninstalling and reinstalling them:
you can try to download the plugin Code Runner. Once the download is complete, select the
settings.json
file. Set the following in the file:Then save the settings and restart the vscode attempt.
Besides, you can try changing the settings for
.vscode/launch.json
. Change the console settings to"console": "internalConsole"
. This will allow it to output results in the debug console.