Debugging
A run of a Routine or an Events graph can be stopped before any statement, read, and walked one statement at a time, whether the toolbar's switch is on Interpreted or Compiled. This works on the graphs that run step by step; a Flows or Function graph has no steps of its own to stop between, so a Flows run pauses only inside a Routine it calls. A breakpoint can also sit on a line of a C# file the document uses - see Breakpoints in a C# file below.
Set a breakpoint
Select a statement - a node with execution pins, such as Print Line - and press F9. A red dot appears at the left of its title, and the status bar reads Set breakpoint on Print Line. F9 again clears it. The Breakpoint switch in the node's Properties does the same. Breakpoints are saved with the document, and setting one is a step of the undo history like any edit.
Run to it
Press F5. While a run can be paused, a red frame lies round the canvas. The run stops before the node with the breakpoint - the node has not run yet - and:
- the node wears a thick amber border and reads paused, and is brought to the middle of the view and selected;
- Run on the toolbar reads Stop, and the Properties panel turns to its Debug face;
- the status bar names the node and the graph it is in - Paused at Print Line in Routine - F5 continues, F10 steps over, F11 steps into, Shift+F11 steps out, Shift+F5 stops - and, beside it, the mode the run is in.
When the statement is in another document - a Routine or Function of a document this one references - that document's tab comes forward, and the run goes on in front of you when you continue: its lines stay on the console whichever tab is showing.

Compiled runs
With the switch on Compiled, a run that has somewhere to stop is built for debugging: the program tells the editor about each statement before it runs it and keeps what each node produced, so it stops, steps and shows values as an interpreted run does - the same red frame, amber border, Debug face and status bar, with Compiled beside the status. A run has somewhere to stop when there is a breakpoint on the document itself, on a document it references that is open in a tab, or on a line of a C# file it references. F11 with nothing running is the other way in: it builds the run for debugging and stops it before its first statement.
A run with nowhere to stop is built for speed, as it always was: nothing can pause it, and it is the same program the document exports to. A program built for debugging runs a tight loop several times slower, which is why it is built only when the run can stop.
A breakpoint saved in a referenced document that is not open stops an interpreted run, but not a compiled one: open that document first.
Breakpoints in a C# file
When a document uses a C# file, open the file - Ctrl+O with the Code files type, or drag it onto the window - and its text tab has a narrow strip to the left of the line numbers. Click the strip beside a line, or put the caret on the line and press F9: a red dot appears, and the status bar reads Set breakpoint on line 6. A breakpoint follows its line as you type above it, and lasts until the editor closes; it is not saved.
Run the document, either way. When a call into the file reaches the line, the file's tab comes forward with the line banded in amber and an arrow in the strip, and the status bar reads Paused at line 6 of MathScript.cs - F5 continues, …. The call stack has a row for the file's method - MathScript.Twice · line 6 MathScript.cs - above the graph that called it, and Locals lists the method's arguments and the variables assigned so far, such as [double] value 3 and [double] doubled 6. F10, F11 and Shift+F11 step through the file's lines and back out to the graph.

A run uses the file as it is saved, so save it before debugging if your edits have moved lines. Lines inside lambdas, iterators and async methods, and files of top-level statements, run but do not stop; a call into a DLL runs whole.
Read where it is
The Debug face, from the top:
- Continue, Pause, Stop, Step over, Step into and Step out.
- Paused, with the node and the graph, and a reminder that the node has not run yet.
- Call stack - one row per graph the run is inside, the innermost first, such as Routine · Print Line, inside For. Click a row to see that graph, with the statement it is at marked.
- Locals - every node that has run in this pass, one row per pin: [In] what came in and [Out] what went out - a For's [In] End 2 and [Out] Current Value 0. A pin whose value has not been worked out yet reads no value yet. Click a row to see its value in full - an image as an image, a table as a table.
- Data members - the current value of every data member the graph can reach, such as [Number] Total 2.
The console dock's Locals and Call stack tabs list the same, and what the run has printed so far is already on its Console tab.
Move on
| Key | What it does |
|---|---|
F5 |
Continue to the next breakpoint, or to the end |
F10 |
Step over: run this statement, and stop before the next one in the same graph - a call to another Routine or Function runs whole |
F11 |
Step into: stop before the next statement anywhere, going into a Routine the statement calls or a C# method it reaches. With nothing running, start a run and stop before its first statement |
Shift+F11 |
Step out: finish this graph, and stop back in the one that called it |
Shift+F5 |
Stop the run |
Pause, on the Debug face, stops a run that is going before its next statement - the way into a long loop with no breakpoint. F9 while paused sets or clears a breakpoint for the rest of the run.
When a statement fails
A statement that fails - a file that is not there, text cut past its end - pauses the run there, breakpoint or not, when the run can be debugged: an interpreted run always, a compiled run when it was built for debugging. The Debug face and the status bar say what failed: Paused at Print Line in Routine, which failed: … - F5 ends the run. Read the values that led to it, then press F5 to end the run - the console opens on the failure, its last line - or Shift+F5 to stop it. A compiled run built for speed that fails is not paused: it ends, and the console opens on the failure.