Closed markvdw closed 4 years ago
Glad you like the software.
Indeed, --pdb
does not work if the error occurs when the file is first imported, only when the tasks are running. So, currently, this will work as expected:
from jug import TaskGenerator
@TaskGenerator
def raise_error(n):
if n > 2:
# <------ error while executing the Tasks: you will be dropped into a debugger
raise ValueError()
for i in range(10):
raise_error(i)
I suppose it is a reasonable request to have it work when the error occurs while importing, though.
I'd like to debug errors that occur when I run a jug script. However, adding the
--pdb
flag doesn't seem to have any effect.Am I misunderstanding the intended use of the
--pdb
option?(Many thanks for the software, it's great)