X

Geertjan's Blog

  • May 4, 2016

New: Pin Debugger Watches in NetBeans Editor

Geertjan Wielenga
Product Manager

Imagine you're a Java teacher or a presenter talking about Java at a conference. Or simply someone who likes being able to keep focus on a piece of code, rather than needing to look in a variety of windows within the software you're using to code or teach Java. You're using an editor to demonstrate some new Java code. You set a breakpoint and then you start the Debugger to step through the code and then... there's a Watches window that you need to point your audience to and repeatedly refer to, which is kind of hard to look at while at the same time trying to looking at the code.

Of course, you can hover your mouse over the variable and then a small tooltip appears showing the current value and then the tooltip disappears when you move your mouse... but hey... wait a minute... that tooltip appears to have a small pin icon to its left in NetBeans IDE 8.2:

...so that when you click on that pin icon a small dialog appears, which shows the current value of the variable you're watching, and remains there while you step through your code in the Debugger:

And you can set multiple pinned watches, while you can use your mouse to move them comfortably anywhere you like within the editor:

Now press Ctrl-Shift-Enter, which removes all the distractions around the editor, and notice that your development environment looks just like a text editor, with the difference that you have all the powerful features of an IDE, together with your watches pinned wherever you want them to be in the editor:

And that's the tip of the iceberg. Imagine if you were to combine it with the Darcula look and feel, for example:


And what about other languages? Yes, other languages too, e.g., JavaScript debugging works the same way:


Many more related features are described in the New and Noteworthy document for the upcoming NetBeans IDE 8.2 release, which you can already take for a spin and provide feedback:

http://wiki.netbeans.org/NewAndNoteworthyNB82#Pin_Watches

Join the discussion

Comments ( 1 )
  • Shai Almog Wednesday, May 4, 2016

    That does look very cool. Any chance of implementing this? : https://netbeans.org/bugzilla/show_bug.cgi?id=248370

    This is a really useful feature as it allows you to review a variable value you didn't know you care about after the fact.


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha
Oracle

Integrated Cloud Applications & Platform Services