Debugging a task type

View Output Log

Every job automatically stores the standard output (stdout) and standard error (stderr) log. These logs can be viewed using the context menu View Job Logs on any finished job. Double clicking a failed job is a convenient shortcut for this first step to diagnose a problem.

Re-run jobs and adjust task

Sometimes the job just needs to be executed again using the context menu New Job Version.

Or perhaps the task configuration needs to be adjust using the context menu Task ‣ Configure task parameters first.

Checkout and checkin task type versions

The task type itself can be adjusted using the context menu Task Type ‣ Checkout Task Type and Task Type ‣ Checkin Task Type Version. For convenience this also offers to create a new job version.

Interactive Python Debugger

For example the Visual Studio Code Python Debugger can be very useful:

Install Core.Host.debugpy on your worker, and add the following Python code at the very start of your task type script:

import debugpy
debugpy.listen(('localhost', 5678)) # Or configure the worker IP address
debugpy.wait_for_client()
debugpy.breakpoint()

This will start a debug server and wait until the debugger connects.

Configure Visual Studio Code for attaching remotely to that debug server. Make sure debugpy is also installed in the local Python used by Visual Studio Code. Start debugging in Visual Studio Code.

Refer to the Visual Studio Code Documentation.

Debugging also works with other debuggers, like Visual Studio. Refer to the Visual Studio Documentation.