Since receiving a new laptop from my new employer, the debugger has been behaving differently to previous experiences (been using IntelliJ on macOs and Windows for years)
I invoke the debugger by creating and running a "Remote JVM debug configuration". When I run the java command to run the code, I provided some parameters so debugging would work.
Previous / preferable behavior: The debugger will open my .java file and stop at the breakpoint.
New behaviour: The debugger will open the .class file (decompiled version of the .class from the .jar file) and stop at the breakpoint.
How do I get back the old behavior back?
Related
Is there a way to force JetBrains IDE startup tasks to be debugged instead of being run?
Specifically, I want to configure WebStorm Settings | Tools | Startup Tasks to automatically perform a JavaScript debug task on IDE startup. The debug task only works by debugging it instead of running it, but it seems that WebStorm performs startup tasks by simply running it. I'm using WebStorm 2022.3.
I'm expecting the task to be performed on startup as if it is executed by clicking the Debug button on the top right of the IDE.
debug mode for startup tasks is not supported right now. However, we have a corresponding feature request on our bug tracker. We would appreciate it if you could upvote the issue to demonstrate additional interest and bring increased awareness to the issue.
In my Intellij project I started not being able to run the application anymore, with ClassNotFoundException for the spring-boot application main class (even though it runs fine from command line) and also
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.InternalError: java.util.zip.ZipException: zip END header not found
As suggested in other answers, I have tried the following
Uninstalled and reinstalled intellij.
Deleted my local .m2 repository and reinstalled my maven application.
But when I go to the project Open dialog and point to the pom.xml it just silently closes down the window. Why does this happen?
When I run my tests on debug, the debugger stops on the test breakpoints, but not in the code itself. Why is that?
I have tried:
Rebooting my machine
Updating IntelliJ to the latest version
Restarting the software and clearing the cache
Deleting the debugger configurations
None of that works.
I also notice that my System.out.println doesn't print to the console in neither the test nor the application code. Not sure if this is related.
I'm using Geb 2.0 (http://gebish.org/) and have downloaded the Gradle sample (https://github.com/geb/geb-example-gradle).
All works just fine on my machine with all browsers (Chrome, Firefox, ChromeHeadless).
I have imported the project in IntelliJ (latest Ultimate edition) and all normal code editing functions are working fine.
What fails is attempting to run a spec. I get an exception with the helpful hint of the path to the driver executable must be set by the webdriver.chrome.driver system property.
However, I can't figure out what to point it at. I've tried pointing at the selenium-chrome-driver-3.6.0.jar but that results in failure also.
I'm using -Dgeb.env=chrome and -Dwebdriver.chrome.driver=SOMERANDOMEPATHSHERE
Help?
The Gradle example Geb project is set up to generate the appropriately configured IntelliJ project capable fo running the specs from the IDE. Simply run ./gradlew idea and load the project by opening the geb-example-gradle.ipr file in IntelliJ instead of loading the project by importing it's Gradle build the way you do.
I have a libGDX project generated by the gdx-setup.jar tool, including core, android, desktop, and html modules. I hadn't touched any of the gradle files, and my build has worked fine for some weeks.
This morning when I opened IntelliJ IDEA (build 135.1230), it offered to update the Scala plugin, so I accepted and restarted, before trying to open the project. My libGDX project doesn't use Scala at all: I have the plugin for other work. When I tried to open the project, I got the infamous "Gradle project sync failed. Basic functionality (e.g. editing, debugging) will not work properly" message. Clicking "Try again" thinks for a bit before showing the same message. The Event Log window contains no output, and the Messages window says:
Error: (of class java.lang.String)
The Scala plugin isn't the only thing that might have changed: I've rebooted the (Ubuntu) machine since the project last worked, so it's possible that some package updates might have only just had an effect.
Following the advice of others, I've tried editing the root gradle.properties to change org.gradle.configureondemand to false, and that made no difference. I've tried performing "Build → Clean Project" and "Invalidate and Restart", with the same effect. I've also tried running git clean -X and reimporting the Gradle project into IDEA, but I just get a "Resolve error" dialog with the same message as above.
Running a build command like
./gradlew android:assemble
from a shell still works fine: only IntelliJ IDEA has a problem.
Even if you've never seen this particular problem, I'd appreciate any tips on where to start debugging it. The error message doesn't exactly give me a lot to go on.