microsoft / vscode-java-test

Run and debug Java test cases in Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-test
Other
298 stars 129 forks source link

If I have a Infinite cycle in the project, how can I stop this test? #1596

Closed AirBashX closed 1 year ago

AirBashX commented 1 year ago

How do I stop if there is a Infinite loop while junit is running?

AirBashX commented 1 year ago

None of Ctrl+F2 and Shift+F5 did not respond

jdneo commented 1 year ago

Have you tried this button? image

AirBashX commented 1 year ago

I didn't find this page, where is it? vscode

你试过这个按钮吗? image

jdneo commented 1 year ago

It's here

image

What's your VS Code version, and you test runner extension 's version?

AirBashX commented 1 year ago

vscode:1.81.1 runner:0.39.1 After testing, I found the problem.This is caused by a plug -in called Code Runner.When I stop this plug -in, the problem is solved

When I enable this plug -in, I will not be able to stop the infinite cycle, the CPU reaches 100 %, and VSCODE can hardly perform any operation until the software stops running.

它在这里

图像

您的 VS Code 版本是什么?您测试 runner extension 的版本是什么?

jdneo commented 1 year ago

I see. BTW, if you want to do some serious coding stuff using Java in VS Code, I recommend leveraging the extensions contained in the Extension Pack for Java.

AirBashX commented 1 year ago

I see. BTW, if you want to do some serious coding stuff using Java in VS Code, I recommend leveraging the extensions contained in the Extension Pack for Java.

Thank you. Actually, I have been using the "Java Extension Pack" and only using "code runner" to compile JavaScript. I am testing Java and I'm not using this extension, but enabling it causes issues with "Test Runner for Java." I believe there might be compatibility problems between the two.