1 / 7

Debugging in BlueJ

Debugging in BlueJ. Davin McCall. Overview. What is debugging? Object inspector Method invocation “Traditional” BlueJ debugger window Demo Questions. Debugging…. Locate the source of a bug Run through the part of the program where we think the bug is occurring, watch program behaviour

herve
Download Presentation

Debugging in BlueJ

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Debugging in BlueJ Davin McCall First BlueJ Day, Houston, Texas, 1st March 2006

  2. Overview • What is debugging? • Object inspector • Method invocation • “Traditional” BlueJ debugger window • Demo • Questions First BlueJ Day, Houston, Texas, 1st March 2006

  3. Debugging… • Locate the source of a bug • Run through the part of the program where we think the bug is occurring, watch program behaviour • In BlueJ this is normal operation!! (to some extent) - inspectors, method invocation • BlueJ also has a (simple) more traditional debugger First BlueJ Day, Houston, Texas, 1st March 2006

  4. Debugging (cont’d) • Set “breakpoints” which will halt the program execution when reached • Once execution is halted, can continue execution line by line (“stepping”), either following or stepping over function calls • Inspect values of variables in currently executing methods (the stack). Inspected objects shown in familiar inspector windows First BlueJ Day, Houston, Texas, 1st March 2006

  5. Stepping • Stepping through code … • Might let us see what is going wrong • Also serves as a good way to demonstrate control structure behavior, program flow, etc First BlueJ Day, Houston, Texas, 1st March 2006

  6. BlueJ as a debugger • Even without the debugger window, BlueJ offers unique features which can be used for debugging and testing • Construct objects on the fly • Call arbitrary methods interactively • Inspect objects and classes to see field values First BlueJ Day, Houston, Texas, 1st March 2006

  7. Conclusion • BlueJ provides basic debugging functionality • Some of BlueJ’s core features (interactive invocation and inspection) are also useful for debugging • Debugging techniques can serve another purpose: demonstrating code behaviour First BlueJ Day, Houston, Texas, 1st March 2006

More Related