Open main menu

CDOT Wiki β

Changes

Python Debugger

1,313 bytes added, 00:50, 3 November 2020
set the break point with 'b' or 'break'
2 breakpoint keep yes at /home/rchan/Desktop/ops435/2020-03/a1/ops435-a1/a1_template.py:72
</source>
== Use the 'n' command to execute the next Python statement ==
Here are the step-by-step execution of your Python script:
<source>
> /home/rchan/Desktop/ops435/2020-03/a1/ops435-a1/a1_template.py(2)<module>()
-> ''' template for ops435 assignment 1 script
(Pdb) n
> /home/rchan/Desktop/ops435/2020-03/a1/ops435-a1/a1_template.py(18)<module>()
-> import os
(Pdb) n
> /home/rchan/Desktop/ops435/2020-03/a1/ops435-a1/a1_template.py(19)<module>()
-> import sys
(Pdb) n
> /home/rchan/Desktop/ops435/2020-03/a1/ops435-a1/a1_template.py(21)<module>()
-> def leap_year(obj):
(Pdb) n
> /home/rchan/Desktop/ops435/2020-03/a1/ops435-a1/a1_template.py(29)<module>()
-> def sanitize(obj1,obj2):
(Pdb) n
> /home/rchan/Desktop/ops435/2020-03/a1/ops435-a1/a1_template.py(37)<module>()
-> def size_check(obj, intobj):
(Pdb) n
> /home/rchan/Desktop/ops435/2020-03/a1/ops435-a1/a1_template.py(45)<module>()
-> def range_check(obj1, obj2):
(Pdb) n
> /home/rchan/Desktop/ops435/2020-03/a1/ops435-a1/a1_template.py(53)<module>()
-> def usage():
(Pdb) n
> /home/rchan/Desktop/ops435/2020-03/a1/ops435-a1/a1_template.py(60)<module>()
-> if __name__ == "__main__":
(Pdb) n
> /home/rchan/Desktop/ops435/2020-03/a1/ops435-a1/a1_template.py(62)<module>()
-> if len(sys.argv) != 2:
(Pdb)
 
</source>
Please try it your self to have some fun!
1,760
edits