Download

Debugging Using Eclipse






Advertisement
/ 15 []
Download Presentation
Comments
Antony
From:
|  
(3888) |   (0) |   (0)
Views: 129 | Added:
Rate Presentation: 0 0
Description:
Debugging Using Eclipse. BusTRAK Team Software Engineering 3/23/2005. Debugging. The process of identifying and fixing errors in software Mainly used to describe run-time errors or incorrect results. Debugging Tips. Prefer compile-time errors to run-time errors
Debugging Using Eclipse

An Image/Link below is provided (as is) to

Download Policy: Content on the Website is provided to you AS IS for your information and personal use only and may not be sold or licensed nor shared on other sites. SlideServe reserves the right to change this policy at anytime. While downloading, If for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.











- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -




Debugging using eclipse l.jpgSlide 1

Debugging Using Eclipse

BusTRAK Team

Software Engineering

3/23/2005

Debugging l.jpgSlide 2

Debugging

  • The process of identifying and fixing errors in software

    • Mainly used to describe run-time errors or incorrect results

Debugging tips l.jpgSlide 3

Debugging Tips

  • Prefer compile-time errors to run-time errors

    • Compiler can spot error quickly

  • GUI debuggers are much easier to use (Eclipse, Visual Studio) than command-line debuggers (gdb)

  • Fix one error at a time and document each change or use CVS

Eclipse debugging l.jpgSlide 4

Eclipse Debugging

  • Pretty buggy in 3.01 release

  • Clumsy interface

  • But better than using the command-line

  • Everything you need can be found in the Run menu

Eclipse debugging features l.jpgSlide 5

Eclipse Debugging Features

  • Breakpoints

  • Step into

  • Step over

  • Step return

  • Step Filters

  • Watches

  • Run to line

  • Suspend/Resume/Terminate

Breakpoints l.jpgSlide 6

Breakpoints

  • Breakpoints cause the thread of execution to suspend and return to the debugger

  • Setting breakpoints in Eclipse is easy, just double-click the left margin

Step into l.jpgSlide 7

Step Into

  • Executes single (highlighted) statement

  • If statement contains call to method, it steps into the method

  • To use:

    • Must be in Debug Perspective

    • Click from Debug Toolbar or press F5

Step over l.jpgSlide 8

Step Over

  • Executes single (highlighted) statement

  • If statement contains method call, the entire method is executed without stepping through it

  • To use:

    • Must be in Debug Perspective

    • Click from Debug toolbar or press F6

Step return l.jpgSlide 9

Step Return

  • All statements in current method are executed

  • Return to where method was called

  • To use:

    • Must be in Debug Perspective

    • Click from Debug toolbar or press F7

Step with filters l.jpgSlide 10

Step with Filters

  • User can specify which methods Step Filter will execute and return from

  • Usually you would want steps to be made only into methods of your own classes

  • To set filters:

    • Go through Window > Preferences > Java > Debug > Step Filtering

Watches l.jpgSlide 11

Watches

  • Watches allow you to view (and sometimes change) the value of a variable during execution

  • In Eclipse, watches are set automatically on variables in scope

  • Watches can be found in the Eclipse Debug perspective in the “Variables” window

  • Eclipse allows you to change the value of variables dynamically during runtime

Run to line l.jpgSlide 12

Run to Line

  • Equivalent to setting a temporary breakpoint

Suspend resume terminate l.jpgSlide 13

Suspend/Resume/Terminate

  • Suspend pauses the current thread of execution and breaks into the debugger

  • Resume resumes a suspended application

  • Terminate stops the program and debugging process

Slide14 l.jpgSlide 14

Demo

Questions l.jpgSlide 15

Questions?


Copyright © 2014 SlideServe. All rights reserved | Powered By DigitalOfficePro