Skip to main content

Script debugger

Windmill's script editor includes a built-in debugger for Python and Bun (TypeScript) scripts. It lets you set breakpoints, step through code, inspect variables, view the call stack, and evaluate expressions in an interactive console.

Starting a debug session

  1. Open a Python or TypeScript (Bun) script in the script editor.
  2. Click the Debug button in the toolbar (next to the run controls).
  3. The editor enters debug mode, indicated by the Exit Debug button and debug controls appearing in the toolbar.

Dependencies

Before a session starts, the script's imports are installed: uv for Python, bun install for TypeScript. The install uses the instance's registry settings, including any workspace-specific override, so a debug session resolves private npm packages and private PyPI repositories the same way a job does. Private registries are an Enterprise Edition feature: on Community Edition the session installs from the public registries and says so in its logs.

Registry credentials stop at the installer. They are never set in the environment of the session itself, which runs the code being debugged.

When the install fails (unreachable registry, unknown package, untrusted certificate), the installer's error is reported in the session logs instead of surfacing later as a missing import.

Breakpoints

Click the gutter (left margin) next to a line number to toggle a breakpoint. A red dot appears to indicate an active breakpoint. When the script execution reaches a breakpoint, it pauses and the current line is highlighted.

Debug controls

Once paused at a breakpoint, use the toolbar controls to:

  • Continue — resume execution until the next breakpoint or end of script.
  • Step over — execute the current line and move to the next one.
  • Step into — enter a function call on the current line.
  • Step out — run until the current function returns.
  • Stop — terminate the debug session.

Variables

The Variables panel displays all local and global variables in the current scope. Values update in real time as you step through code. Use the filter input to search for specific variables.

Call stack

The Call Stack panel shows the current execution stack, listing each function frame with its file and line number. Click a frame to navigate to that location in the editor.

Console

The Console panel at the bottom of the editor allows you to evaluate expressions in the current scope while paused. Type an expression and press Enter to see its result. Use the up arrow to recall previous expressions.