Monday, January 5, 2009

Eclipse Debugger, part III

Let's continue our tour through the features of the Eclipse debugger. In the last parts (Part I, Part II) I was writing mostly about breakpoints and this time won't be any different. When we look at the views provided by the debugger we will find

the Breakpoints view.


The main purpose of this view is to manage the breakpoints - it allows to easily (going from left to right through the buttons on the view's toolbar):
  • remove selected breakpoints - I guess it's self explaining
  • remove all breakpoints - I guess it's self explaining
  • show breakpoints supported by selected target - when you debug different kind of artifacts (code in java or C or ant build script) you can make the Breakpoints view show only the breakpoints that are supported by this type of the given artifact [Thanks Jacek for helping with figuring this out!]
  • go to the file for breakpoint - it will show the place where the breakpoint is set in the editor
  • skip all breakpoints - when you don't want any breakpoint to be active check this option
  • add java exception breakpoint - I was writing about this in the first part
More cool features can be found in the view's menu, you can:
  • group the breakpoint by many criteria, e.g. type, project, files, etc.
  • define breakpoints working set
  • check the option to show qualified names in the view
The view allows you also to change the breakpoints' properties directly from the context menu - just right click on any breakpoint and you would see the options to:
  • change the hit count value
  • make the breakpoint suspend the VM or suspend the thread
To finish the breakpoints story it has to be said that breakpoint can be imported and exported - you can open the appropriate wizards from the Breakpoints menu or from the File->Export->Run/Debug->Breakpoints option.

Is there anything I have missed about breakpoints? Please, share!

That's it for this week - next time I will focus on the Variables view, which is essential for efficient debugging.

No comments: