In my case, IntelliJ set the default java compiler to Ajc. After changing it to Javac the debugger worked as expected (Settings -> Build, Execution, Deployment -> Compiler -> Java Compiler -> Use compiler: Javac)
Answer from OHY on Stack OverflowIn my case, IntelliJ set the default java compiler to Ajc. After changing it to Javac the debugger worked as expected (Settings -> Build, Execution, Deployment -> Compiler -> Java Compiler -> Use compiler: Javac)
I faced this issue when running a (previously written) unit test. It was happening because the method call was mocked. Hence, the debugger would step into the method as usual, but would not able be able to read this object.
Not able to Run->Debug in Intellij Idea 2022.1, it shut's down immediately with exit code 2
IntelliJ: unable to debug
Solved - Unable to effectively debug a Java application using Intellij | The FreeBSD Forums
java - Intellij - Debugger not working in maven project - Stack Overflow
Videos
I am writing unit test cases with power mock . While debugging the execution goes to a different class and debug window show ‘this’ is not available. I get null pointer exception after that . What does this mean . I have mocked the dependencies and created mocked objects for the classes . It’s not that it’s object was never created . Tried to google this but it seems an open issue with IntelliJ .
Hi, I'm trying to debug my Java program, but for some reason, it doesn't start debugging from where I've set the viewpoints. I've debugged in a similar way a couple of times in the past, but for some reason when I try to use Shift+F9, my code is directly executed. May I know what to do? TIA.
You can probably wrap the value of that argument in quotations. The parser that reads the entire command line string is probably choking because of the -D arg within a -D arg.
clean package -Drun.profiles=dev-us-east-1 -Drun.jvmArguments="-Denvironment=dev" -DskipTests spring-boot:run
After some searching I found that the problem is with my Maven Run/Debug configuration in IntelliJ. The command line I use to start the spring boot rest api is
clean package -Drun.profiles=dev-us-east-1 -Drun.jvmArguments=-Denvironment=dev -DskipTests spring-boot:run
It appears that the -Drun.jvmArguments=-Denvironment=dev java command line property is the culprit. When I remove it the break points work again.
I am debugging a remote java 1.7 application in IntelliJ IDEA,
During debugging the variables and their values are shown but if I hot swap a class file. Then variable and their values are not shown.
For hot swapping I have used this extension
Single Hotswap - IntelliJ IDEs Plugin | Marketplace (jetbrains.com)
Is it a bug or is there any way to show variable values after hot deploying a class file?