vscode-java-debug icon indicating copy to clipboard operation
vscode-java-debug copied to clipboard

Repeated start of spring boot will cause the output to fail to switch

Open HelloWorld-orz opened this issue 6 years ago • 8 comments

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.

HelloWorld-orz avatar Feb 15 '19 05:02 HelloWorld-orz

@Eskibear could you please take a look?

akaroml avatar Feb 15 '19 05:02 akaroml

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

tmp

Eskibear avatar Feb 15 '19 06:02 Eskibear

Your demo seems to generate two different names, I just click run and do not automatically generate a different name for the launch configuration. image

HelloWorld-orz avatar Feb 15 '19 07:02 HelloWorld-orz

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 image then you get the error message. image

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)

Eskibear avatar Feb 15 '19 07:02 Eskibear

I think the debugger extension should be consistent with VS Code's preference, i.e., reject to launch repeatedly. cc @testforstephen

Eskibear avatar Feb 15 '19 07:02 Eskibear

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 avatar Feb 15 '19 07:02 Eskibear

@Eskibear My debug name seems to be different from yours. My name is at the beginning of CodeLens. Where am I getting it wrong? image

HelloWorld-orz avatar Feb 15 '19 07:02 HelloWorld-orz

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

Eskibear avatar Feb 15 '19 07:02 Eskibear