gradescope-utils icon indicating copy to clipboard operation
gradescope-utils copied to clipboard

Provide stack backtrace for errors in student code

Open marie-r opened this issue 4 years ago • 1 comments

When student code generates exceptions, e.g. IndexError, tests fail without any indication of the root cause, making it difficult for students to debug their code. This change to the JSON test runner provides context by outputting the last stack frame (easy to change for last N frames).

marie-r avatar Sep 05 '20 00:09 marie-r

Thanks! This is a great idea, though I don't know if it should be the default behavior. It'd be preferable to make it configurable, either as a top-level setting on the JSONTestRunner object, or perhaps even a test-case-level setting via a decorator.

ibrahima avatar Aug 15 '22 23:08 ibrahima