Debug
The same configuration's Debug opens the session under Kalem's debugger, in IntelliJ's own debugger.
- A click in a
.kalemfile's gutter sets a line breakpoint. Only lines that run something take one: declarations, handler, function and state headers,end,else, comments and empty lines do not. A breakpoint in a script the world does not run, or in a client script, is marked invalid: Debug stops the world's (server) scripts only. - When a transaction enters that line, the world stops:
- Frames shows the calls, innermost first (
Open: on enter,decide,on timer opening, closing), the stack named by its object, binding and trigger; - Variables shows the frame's locals, the instance's state, its Memory, its Fields (with the transaction's writes not applied yet: "false → true when the transaction ends") and its Properties.
- Frames shows the calls, innermost first (
- Step Over, Step Into and Step Out go by the script's lines; Run to Cursor and Resume.
- While it stands there, the world's clock stands still, and nothing is saved.
- Breakpoints can be added and removed during the session; one in
on readystops at the first moment.
In the Debug tool window, Play's panels stand beside the debugger's own: the debugger's Console is the log; View, with Objects and Events, is in the same tab above it; Profile has a tab of its own. The clock's buttons are beside the clock in View; Step Ten Minutes and Send wait until the world goes on.
Evaluating expressions, watches and conditional breakpoints are not there yet.