vscode-java-debug
vscode-java-debug copied to clipboard
Repeated start of spring boot will cause the output to fail to switch
I started a spring boot, then modified some configurations and started it again. All of them started successfully. Then I switched the output console and found that I couldn't switch to the output of the first startup. Then I turned off the last startup program. At this time, you can see the output of the program that was started for the first time.
@Eskibear could you please take a look?
@pehalo I just tried starting the same project with 3 different configurations, and each time I changed the server.port
to avoid port occupation. It works well, I cannot reproduce the issue you mentioned.
Your demo seems to generate two different names, I just click run and do not automatically generate a different name for the launch configuration.
I use 2 different names because VS Code doesn't allow me to launch repeatedly. If you start the debug session by clicking the triangle button
then you get the error message.
By clicking the CodeLens, indeed I can reproduce your issue. I suspect it's because the debug consoles are using the same name, and VS Code cannot distinguish them. (That's why VS Code doesn't allow me to launch repeatedly)
I think the debugger extension should be consistent with VS Code's preference, i.e., reject to launch repeatedly. cc @testforstephen
Just a note that technically it's able to allow user repeatedly launch the same project via the CodeLens, by appending a hash value to the name for each launch.
@Eskibear My debug name seems to be different from yours. My name is at the beginning of CodeLens. Where am I getting it wrong?
@pehalo Nothing wrong, it doesn't matter. As far as I know, it's depend on the way you launch a project for the first time. Yours are created by clicking the "Run" CodeLens. I started the project by pressing <F5>.