Presentation is loading. Please wait.

Presentation is loading. Please wait.

An introduction to the debugger And jGrasp editor-syncrasies (ideosyncrasies)

Similar presentations


Presentation on theme: "An introduction to the debugger And jGrasp editor-syncrasies (ideosyncrasies)"— Presentation transcript:

1 An introduction to the debugger And jGrasp editor-syncrasies (ideosyncrasies)

2 JGRASP EDITOR- SYNCRASIES

3 The jGRASP editor  Problem: Indentation seems to befuddle the jGRASP editor.

4 The jGRASP editor  Problem: Indentation seems to befuddle the jGRASP editor.  Solution: Tell jGRASP to use spaces instead of tabs.

5

6 before after Check Soft Tabs and set the Tab Size to 4. Click Apply and then OK. Now pressing the tab key will insert 4 spaces (and existing tabs will be converted to 4 spaces).

7 The debugger Our main topic

8  A primitive way of debugging is to insert print statements. Using the debugger

9  A primitive way of debugging is to insert print statements.  That’s OK but a debugger is much more powerful.

10 Using the debugger  A primitive way of debugging is to insert print statements.  That’s OK but a debugger is much more powerful. It allows us to execute our code one line at a time.

11 Using the debugger  A primitive way of debugging is to insert print statements.  That’s OK but a debugger is much more powerful. It allows us to execute our code one line at a time. It allows us to set breakpoints (stop points) in our code.

12 Using the debugger  A primitive way of debugging is to insert print statements.  That’s OK but a debugger is much more powerful. It allows us to execute our code one line at a time. It allows us to set breakpoints (stop points) in our code. We can even examine and change the contents of variables as our program runs.

13 Setting a breakpoint

14 Breakpoint is now set

15 Start the debugger  Build -> Debug The program then runs and stops at our first breakpoint.

16 end debugging

17 variables (r-click to change value)

18 next line to be executed

19 step over next line to be executed

20 step in next line to be executed

21 step out next line to be executed

22

23

24

25

26


Download ppt "An introduction to the debugger And jGrasp editor-syncrasies (ideosyncrasies)"

Similar presentations


Ads by Google