by edwinnathaniel · 13y ago · 0 comments
You can set a breakpoint (conditional or not), and have every thing within that context available for you. The next step is to launch an "Evaluation window" where you can execute Java code.
If you were to set the breakpoint at the web-application level (as opposed to plain Java process/class/console-app), you can get information of the Threads and Frames as well.
This techniques have been available for quite some time in the IDEs... that is provided you're not allergic to IntelliJ/NetBeans/Eclipse.
Best part: no code change.
I have no comment for those who prefer VIM/Emacs and bemoaned the lack of powerful stuff they got from other environments.
I am more with the VIM/Emacs crowd though I guess.
I didn't know though that you could create an "evaluation window" in Eclipse. I really liked the refactoring features in Eclipse though and miss them sometimes.
http://www.cavdar.net/2008/09/13/5-tips-for-debugging-java-c...
- You can set breakpoint only for "Exception"
- You can set "Step Filtering" to avoid JDK standard classes (or libraries that you know won't cause the bugs)
- The Expression Evaluation also supports code-assist/code-completion
It's really tough to beat IDEs like Eclipse and IntelliJ these days with plenty contributors and strong companies behind them churning new features everyday.