CCExtractor Development

(V) [winnerstrack] Python: Advanced Python debugger

This task should only be attempted if you have done the previous ones in the series.

Extend your debugger to add this functionality:

  • If a program name is passed as a argument (path to a .py file) load that file and, by default, debug its main function. If that's not possible, default to a different one.
  • Allow passing a different starting function name.
  • Write the output to a .text file. A suggestion here is that the .text file contains a json string per line, but you could use a different format. That json file needs to contain the same info you are currently printing to console, plus a "step" number (which is just incrementing starting at 1) and a timestamp for each step.
  • If instead of a program name the argument passed is a .json file, then read that json file (which was of course generated by your own program) and write its output to screen, in human readable form.

As you can see, what we are doing here is separate the work in two phases: Analysis and reporting. The reporting should just need the json file, but not the source code of the program being debugged.

Task tags

  • python
  • debugger
  • winnerstrack

Students who completed this task

Knob, cppio, Tantan4321, AlephZero, knightron0, kdrag0n, dhrumilp15, Krzysztof, Techno-Disaster, Musab Kılıç

Task type

  • code Code
close

2019