hints on debugging bwuaa/teaching.html

4
Hints on debugging http://www.cse.ust.hk/~bwuaa/teaching.html

Upload: bernard-blake

Post on 18-Jan-2016

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Hints on debugging bwuaa/teaching.html

Hints on debugginghttp://www.cse.ust.hk/~bwuaa/teaching.html

Page 2: Hints on debugging bwuaa/teaching.html

Procedure of debugging

• 1. Set debugging point

• 2. Run the program• 3. The program will stop at the debugging point (otherwise something

must be wrong before your debugging point). • 4. Point to variables you want to check (use the mouse).

• 5. Continue, pause, and stop

Page 3: Hints on debugging bwuaa/teaching.html

Continue, pause, and stop

• Continue: go to the next debugging point (or ends the program if there’s no more point).• Pause: pause the program at where it is (you can try it in an infinite

loop).• Stop: ends the program and the debugging.• When you cannot run the program, you should try to stop the program first.

Page 4: Hints on debugging bwuaa/teaching.html

Debug when the program asks you so• Click debug if you encounter:

• Then: