IDEA 2016.3: Throwing an Exception during Debugging
Hello,
I'm trying to accomplish the following scenario in IntelliJ IDEA 2016.3:
During remote debugging of a Java web application (running on Weblogic), I want to throw an exception at a breakpoint.
The reason for this is that during debugging of a complex back-end method I want to rollback my transaction (a rollback happens when my EJB has an exception).
This way I can redo the action multiple times as it will always rollback when an exception occurs without changing my code or committing my testdata.
In Eclipse this was easily done by typing: 'throw new NullPointerException()' in the Display view and executing this block.
What I have tried in Evaluate Expression/Evaluate Code Fragment:
- throw new NullPointerException();
- Thread.currentThread().stop(new NullPointerException());
But both will just evaluate the throwing of my exception and not really running it in my thread (I can still continue my debugger as if nothing happened).
Is there a way to accomplish the throwing of an exception during a remote debugger in IntelliJ IDEA?
Kind regards,
Stijn
Please sign in to leave a comment.
No way yet, sorry.
Please vote: https://youtrack.jetbrains.com/issue/IDEA-148408