Tuesday, August 29, 2006

A Whole Lotta' Instances

A first draft of another one of the new Java SE 1.6 features is out and ready to be played with. Much like the other feature (All References), All Instances works in pretty much the same way. You can right-click on a variable and select the All Instances... menu item, and before you know it WHAM, you see a popup showing you all of the instances of the selected object in the current VM. Isn't that dandy.

Much like it's companion All References, you of course need a Java SE 1.6 VM to use this feature, and you must be debugging at the time (i.e. have variables in the variables view). There are plans in the mix to expand its availabilty to the Outline View and to a context menu in the java editor....we shall see.

The first image below shows the location of the new action, and in this case we have selected a string, which will result in a popup showing all of the instances of type String in the current VM.

This next image shows the resulting popup (yes it is the inspect popup) telling us that there are 769 instances of String in the current VM. Allow me to say again, dandy.

To try out this...dare I say again...dandy new feature, you will have to wait until the next build or grab the source from HEAD.

Wednesday, August 09, 2006

Browse All References (J2SE 6 only)

If you're running your Java application with a J2SE 6 virtual machine, you can browse all references to an object in the variables view. Select any object in the variables view, and choose All References from the context menu. A pop-up displays all objects referring to the selected object. You can expand each node in the tree to follow references to each object. You can inspect any object in the reference tree by selecting it and pressing Ctrl+Shift+I. This opens an inspect pop-up displaying the object's fields.

This feature is available in the latest integration build and forthcoming 3.3M1 build. It's our first cut of the feature, so feedback and comments are welcome.

Wednesday, August 02, 2006

Let the pain slip away

Seeing as how I seem to be in such a blog-tastic mood....the debug team has provided another fix to try and lower the overall frustration of level of at least a few people.

Have you ever been nailed by the "java.lang.UnsupportedClassVersionError: foo (Unsupported major.minor version 49.0)" error? If you have this applies to you.

In an effort to make life a little less painful, we now do compliance checking in the JRE preference page and in the launch configuration dialog. So if you change your default JRE to be lower than the compiler compliance level you get a nice warning and a link back to the compiler page to change the compliance level.

Alternatively in the launch configuration dialog compliance issues are treated as errors (since you can't launch anyway) and you see the nice angry error message.

Just like the previous breakpoint axesomeness, you will have to wait until tomorrows build to try it out...

Breakpoints are Axesome

Everyone loves breakpoints. Why else would you debug if you did not want to use breakpoints?
That being said, this last week we refactored alot of our breakpoints code to make it better all around and to add some new features.

For example:
  1. If you use the shortcut Ctrl+Shift+B, you will get the correct kind of breakpoint (instead of just a line breakpoint)
  2. Added new Run menu item "Toggle Breakpoint" which is now bound to the Ctrl+Shift+B shortcut (which also retargets the command to create the proper breakpoint, see point 1 above)
  3. You can toggle Class Load breakpoints like other breakpoints (using the shortcut, double clicking on the ruler, or using the Run->Toggle Breakpoint menu)
  4. That slight flicker in the breakpoints view when you create method breakpoints or watchpoints is gone.
  5. Improved menu population/enablement for toggle breakpoints actions in the Run menu, Outline View and the Variables View.
Here is a screen shot of the new Run menu item.

All this breakpoints goodness will be available after tomorrows build...