views:

24

answers:

2

Hello,

I'm using IntelliJ 9 and I'm curious if there is any IntelliJ equivalent of the Visual Studio 'immediate' debug window. There is ALT-F8 to evaluate an expression, but what I'd like to be able to write code in a window that interacts with what I am currently debugging (if that's even possible).

Having breakpoints that log messages to the console is helpful, but I'd like to do more than that if I can.

Thanks!

A: 

You can write code in alt-f8.. but you have to do it only 1 line at a time. If you do a return, your code will return when you hit next (I think). It isn't ideal though...

bwawok
+2  A: 

Intellij IDEA's Expression Evaluation dialog has a button to enable Code Fragment Mode, which permits multi-statement evaluations. (I'm using version 9.0.2 of the Ultimate Edition.)

Noel Ang
Cool, never noticed that button before.
Yishai
Awesome thanks!
Jon