You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yes, it is caused by the code fix for this issue #111, for a workaround, you can move it to non-test folder, I will detect whether you are staring main class from test source folders later.
Same thing here (same VSCode, Java Tools and Java Debugger versions, but under Windows) - cannot debug unit tests anymore. I cannot move all unit tests to other folder - build and other tools rely on standard maven project structure.
Debug session starts, but after few (2-5) steps (F10) it hangs. Pressing Shift+F5 stops debug session.
Cannot add some local variables and method parameters to the Watch list.
Mouse over doesn't show values for many variables
Conditional breakpoints never stop. If I set them - debug session starts and runs forever.
Language Support for Java log panel shows "Exception processing async thread queue"
Unit test by click Debug Test code lens should not be influenced, please go to the https://github.com/Microsoft/vscode-java-test/issues to raise an issue if you can not run unit test, but if you want to run the main method at test classes, it should not work by now due to my change.
glad to know there wasn't wrong with my dev pc :) tried everything(uninstalling vs code, using insider edition, uninstalling plugins etc. manual classpath) but coudn't fix it. eventually went to eclipse temporarily :). so i'm happy to know what was the cause. :)
Andy Xu(devdiv) (@andxu) It fails for me from both places - from Test runner and Code Lens. Actually, I rarely use Test Runner to start tests, because when I develop a method/test I run/debug tests that I am working on or fixing. I use Test Runner is for big/sweep runs.
lasalame I will work on this items after the release 0.13.0, can you help to give me a sample project which doesn't work for both places(attach the project folder here in this issue)?
maven:
a. git clone https://github.com/andxu/samples and git checkout andy_test
b. open the simple-app folder, and open the samples\simple-app\src\test\java\hello\GreeterTest.java
c. set breakpoint on line 18
d. click the debug code lens before the main method
e. verify the GreeterTest is launched with the correct class path.
gradle:
a. git clone https://github.com/andxu/samples and git checkout andy_test
b. open the gradle-sample folder, and open the samples\gradle-sample\src\test\java\hello\GreeterTest.java
c. set breakpoint on line 18
d. click the debug code lens before the main method
e. verify the GreeterTest is launched with the correct class path(same with maven scenario above).
Activity
andxu commentedon Sep 10, 2018
Yes, it is caused by the code fix for this issue #111, for a workaround, you can move it to non-test folder, I will detect whether you are staring main class from test source folders later.
lashchev commentedon Sep 10, 2018
Same thing here (same VSCode, Java Tools and Java Debugger versions, but under Windows) - cannot debug unit tests anymore. I cannot move all unit tests to other folder - build and other tools rely on standard maven project structure.
Language Support for Java log panel shows "Exception processing async thread queue"
andxu commentedon Sep 10, 2018
Unit test by click Debug Test code lens should not be influenced, please go to the https://github.com/Microsoft/vscode-java-test/issues to raise an issue if you can not run unit test, but if you want to run the main method at test classes, it should not work by now due to my change.
andxu commentedon Sep 12, 2018
Sheng Chen (@jdneo) to take a look at test runner side.
joshryanne commentedon Sep 12, 2018
glad to know there wasn't wrong with my dev pc :) tried everything(uninstalling vs code, using insider edition, uninstalling plugins etc. manual classpath) but coudn't fix it. eventually went to eclipse temporarily :). so i'm happy to know what was the cause. :)
clankill3r commentedon Sep 12, 2018
No I hope it get's fixed fast :)
joshryanne commentedon Sep 12, 2018
i rolled back mine to 0.11.0 till it is solved :)
lashchev commentedon Sep 14, 2018
Andy Xu(devdiv) (@andxu) It fails for me from both places - from Test runner and Code Lens. Actually, I rarely use Test Runner to start tests, because when I develop a method/test I run/debug tests that I am working on or fixing. I use Test Runner is for big/sweep runs.
andxu commentedon Sep 14, 2018
lasalame I will work on this items after the release 0.13.0, can you help to give me a sample project which doesn't work for both places(attach the project folder here in this issue)?
andxu commentedon Sep 26, 2018
microsoft/java-debug#232
andxu commentedon Sep 27, 2018
To test it:
a.
git clone https://github.com/andxu/samplesandgit checkout andy_testb. open the
simple-appfolder, and open thesamples\simple-app\src\test\java\hello\GreeterTest.javac. set breakpoint on line 18
d. click the debug code lens before the main method
e. verify the GreeterTest is launched with the correct class path.
0 21 57548 n:\jdk1.8.0_181\bin\java -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=localhost:52207,server=n,suspend=y -Dfile.encoding=UTF-8 -cp N:\andxu\samples\simple-app\target\classes;N:\andxu\samples\simple-app\target\test-classes;C:\Users\andxu\.m2\repository\org\apache\commons\commons-lang3\3.6\commons-lang3-3.6.jar;C:\Users\andxu\.m2\repository\joda-time\joda-time\2.9.2\joda-time-2.9.2.jar;C:\Users\andxu\.m2\repository\junit\junit\4.12\junit-4.12.jar;C:\Users\andxu\.m2\repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar hello.GreeterTesta.
git clone https://github.com/andxu/samplesandgit checkout andy_testb. open the
gradle-samplefolder, and open thesamples\gradle-sample\src\test\java\hello\GreeterTest.javac. set breakpoint on line 18
d. click the debug code lens before the main method
e. verify the GreeterTest is launched with the correct class path(same with maven scenario above).
clankill3r commentedon Oct 1, 2018
Can other people get this to work?
I get:
Error: Could not find or load main class hello.GreeterTest.(Edit: I guess I have to wait for the 0.14.0 release)...
clankill3r commentedon Oct 1, 2018
joshryanne I want to roll back as well, do you happen to know what the VSIX link is?
It such a pain to find it. The link should be close to this:
https://ms-vscode.gallery.vsassets.io/_apis/public/gallery/publisher/ms-vscode/extension/vscjava.vscode-java-debug/0.12.0/assetbyname/Microsoft.VisualStudio.Services.VSIXPackageBut we are dealing with microsoft here...