I want to find a way to do a debug probe in Java. I’m used to working in Wingware Python IDE and it lets me set a breakpoint and once the execution reaches it, I have a Python shell, where I can execute arbitrary Python code in the context of a place, where the execution is paused. So I want to do the same in Java, i.e. set a breakpoint and get to know what would certain code do if I’d place it directly after that bp.
Edit:
I’m using Eclipse. Where should I type? 🙂
Any decent IDE will do this (e.g. Eclipse, Intellij or Netbeans). They will let you evaluate Java arbitrary expressions, so you can hit a breakpoint and then execute code based on the variables available to you.
An alternative is to use jdb – the command line debugger that comes with the JDK. That permits evaluation of simple Java expressions.