← The Protocol Lab — all BIOVIA Pipeline Pilot guides

Debugging Pipeline Pilot Protocols

Finding and fixing problems fast — before they find you in production.

Every protocol breaks eventually — usually at 11PM when the morning manufacturing report depends on it. The difference between a junior developer and an experienced one is not whether things fail; it is how fast and systematically you diagnose them. After a decade of production incidents, I've developed a debugging approach that consistently reaches root cause in minutes, not hours.

Two modes of debugging

Pipeline Pilot gives you two fundamentally different ways to investigate a problem. Know when to use each:

  • Debug Mode (interactive) — run the protocol step by step, pausing after each component to inspect the data flowing through. Use this during development and initial testing. Click the bug icon in the toolbar instead of the Run button to enter it.
  • Log Analysis (post-mortem) — read the server execution logs after a failure. Essential for production issues where you cannot run Debug Mode interactively. Logs are in the Protocol Service logs folder on the server, or viewable in the Server Manager console.
  • Use Debug Mode while building. Switch to log analysis for production failures. Both are non-negotiable skills for any serious Pipeline Pilot developer.

Debug Mode — a complete walkthrough

  1. Click the Debug button (bug icon) in the toolbar. The protocol starts in paused mode with the first component highlighted.
  2. Press Step Forward (F10) to execute one component at a time. The active component is highlighted in yellow.
  3. After each step, click any component to open the Data Viewer in the right panel — it shows every property and value on every record that came out of that component.
  4. Set a breakpoint on a specific component (right-click → Add Breakpoint) then click Run. The protocol runs at full speed and pauses only at the breakpoint — useful when the error occurs deep in a long pipeline.
  5. Add property watches to track specific values as records flow through. If a calculated value is wrong, watch it change — or not change — at each step.
  6. When you find the issue, fix the component properties in place, click Reset (↺) and run again. You do not need to exit debug mode.

Reading error messages

Pipeline Pilot error messages are more informative than they first appear once you know how to read them:

Error PatternLikely CauseFirst Thing to Check
Property X is nullMissing data or wrong property name (case-sensitive)Inspect the exact property name in the Data Viewer — copy-paste it
Cannot connect to data sourceDB down, wrong credentials, network issueTest the connection in Server Manager → Connection Definitions
Type mismatch: expected Float, got StringMath on a text property without conversionWrap the value in mol::ToFloat() in your PilotScript expression
Protocol timed outToo many records, slow query, network latencyRun the SQL directly in a DB client to check query speed
Component not foundComponent from a collection not installed on this serverCheck installed collections in Server Manager → Collections
Access denied to file pathService account lacks read/write permissionCheck the PP service account permissions on the file/folder

The systematic debugging checklist

  1. Reproduce it — can you run the same protocol with the same input and get the same failure? If not, the failure is intermittent (network, timing, data-dependent) and needs a different investigation approach.
  2. Find the failing component — run in debug mode or read the server log. The error always names the component and usually identifies the property or record causing the issue.
  3. Inspect the data at that component — what did the record actually look like? Is the property null? In the wrong format? An unexpected value?
  4. Trace back to the source — walk upstream through the protocol to find where the bad data originated. The fix is almost always at the source, not at the component that reported the error.
  5. Check for a data pattern — does this fail on every record or only specific ones? Add a filter before the failing step to see if bad records share a characteristic (null field, specific site code, certain date range).
  6. Fix and verify with counts — after fixing, add a counter after each major step to confirm records flow as expected. Zero records at any step after the reader is always a bug.

Production debugging without Debug Mode

On a production server under a service account, interactive Debug Mode is not available. Here is my production debugging toolkit:

  • Server Manager → Protocol Service → View Logs — find the failed run by timestamp and read the full execution log. Every component execution and every error is recorded.
  • Build a diagnostic clone — copy the failing protocol and insert Write to Log and Record Counter components at each major step. Run it with production data to see exactly where records are lost.
  • Use 'Write to Log' to emit specific property values mid-execution — the fastest way to answer 'what was the value of X when the protocol reached this step?'
  • Connect the error port — if a failing component has an unconnected error output port, reconnect it to a counter and a Write component, then rerun to capture failed records and their error messages.
  • Run the SQL directly — when the failure is in a Read Database step, execute that exact query in a SQL client. Database errors are far clearer outside Pipeline Pilot's error wrapper.

Tip: Build an 'autopsy protocol' template — a skeleton with Write to Log, Record Counter and Error Handler components already wired in. When a production protocol fails, clone it and insert this skeleton at the failing section. You get full visibility in one targeted run, without disrupting the production protocol.