30 Days with IntelliJ IDEA. Debugger

Thank God it’s Friday! But before you start enjoying the weekend, we have one more article to share with you from our 30 Day Guide, exploring the trickiest features of IntelliJ IDEA.

Today we will talk about such an essential tool as the debugger. If you think you know everything about it, you’re in for a surprise. With IntelliJ IDEA, the productivity-enhancing possibilities are endless.

Smart step into

Did you know that IntelliJ IDEA lets you choose a method to step into when you stay at line with more than one method calling? To do that you have to use Smart step into action via Shift + F7 (Cmd + F7 for Mac). This is a great time-saver.

Marked instances

As you may know, the debugger in IntelliJ IDEA lets you mark any instance with a colored label so you can recognize it easily while debugging. But you probably didn’t know that you can use these labels in a breakpoint’s condition expression.

Action breakpoints

One more feature you should be aware of is Action breakpoint. It can be useful if you want to evaluate something at a particular line of code without actually making a stop. To create this kind of breakpoint, just click on the gutter while holding Shift.

Please read the complete article to learn more tricks about debugging in IntelliJ IDEA.

Develop with Pleasure!

About Andrey Cheptsov

Andrey Cheptsov is IntelliJ IDEA product marketing manager at JetBrains. He's passionate about productivity, programming languages and tools.
This entry was posted in Tips & Tricks and tagged . Bookmark the permalink.

5 Responses to 30 Days with IntelliJ IDEA. Debugger

  1. Tropper says:

    Very nice! Lot of stuff I didn’t know.

    The only feature missing is what Apple did in the new XCode 5:

    if you hover over a UIImage instance it shows image itself and not the binary data. Would be nice if IDEA could he same for BuffereredImage oder Image instances for example. Apple did this for some other useful stuff too. It’s always helpful when the object in question is some kind of visual “object” and you are not interested in the raw data.

  2. Anderson says:

    That’s why it is my favorite IDE!

  3. Adam says:

    Why does my cpu usage spike when I set a breakpoint? Doesn’t happen in Eclipse but IntelliJ sends my fans spinning and both of my cores skyward.

  4. Alan says:

    Thanks. Nice article. One thing I would like to see: when hovering the mouse over a variable, having it’s value displayed in a small tooltip or popup. If an expression is selected, then doing the same when hovering over the selected expression. I’m happy to have this activated with some modifier…like holding down Alt.

    The current model of opening a heavy window, changing focus, having to hit return one more time is a bit clunky for simple objects. It’s perfect for Collections and such…

    Thank you for the very nice article.

  5. Romeo Frenksen says:

    Hi,
    great article. Thank you!

    Could you please elaborate on using labels in a breakpoint’s condition expression? Where is My_Thread_DebugLabel defined?

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>