Start Debug Session
openl_start_traceStart a table debug session and run to the first stop, returning the execution stack for step-by-step inspection. Use profiling mode to obtain a compact overview of the slowest tables instead of a large trace.
Instructions
Start an interactive debug session for a table and run to the first stop. Returns the execution stack (status + frames root→current). Default stopAtEntry: true suspends at the entry of the first frame; from there use openl_step_trace / openl_resume_trace and openl_inspect_trace_frame. For test tables pass testRanges (e.g. '2'); for regular rules pass inputJson { params, runtimeContext? }; omitting both replays the previous run's remembered input. Cheapest way to understand a whole run: profiling: true with stopAtEntry: false and no breakpoints — completes in this one call and returns 'profile', a constant-size overview of the top-N slowest tables (selfMillis/totalMillis/count) plus nodeCount/distinctTables/totalMillis. For a profiling overview pass inputJson (or testRanges) together with profiling: true and stopAtEntry: false EXPLICITLY every time — do not rely on replay (omitting the input): a replay only reproduces the compact profile if the remembered run was itself a profiling run, otherwise it can return a much larger stack that overflows the response limit. Find the hot or unexpected table in profile.hotspots, then replay into it with a breakpoint to inspect live values. The executed 'tree' is omitted by default; set includeTree: true to get its ROOT node (one level — each step carries a childrenTotal count) and browse a branch level by level with openl_expand_trace_tree. One active session per user — starting a new one terminates the previous. Idle sessions are reaped after ~10 minutes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tableId | Yes | Table ID to debug (e.g., 'calculatePremium_1234'). Get from openl_list_tables(). | |
| inputJson | No | For regular rules: JSON input. Use object with params (required) and runtimeContext (optional). E.g. { params: { age: 25 }, runtimeContext: { lob: 'Auto' } }. Omit BOTH inputJson and testRanges to replay the previous run's remembered input (e.g. restarting with profiling or new breakpoints). | |
| profiling | No | Retain the executed call tree — structure and timings, NO values (default false). With stopAtEntry: false and no breakpoints the run completes in this single call and returns a constant-size 'profile' overview (top-N slowest tables); the tree's root node comes with includeTree: true and is browsed level by level with openl_expand_trace_tree. | |
| projectId | Yes | Project ID returned by backend. Use the exact 'projectId' value from openl_list_projects() response without modification or reformatting. | |
| fromModule | No | Module name to trace in the context of a specific opened module. Usually omit. | |
| profileTop | No | Number of hotspots (slowest tables) in the 'profile' overview (backend default 20). | |
| testRanges | No | For test tables: comma-separated test-case ranges (e.g., '1-3,5'). Omit for regular rule execution. | |
| breakpoints | No | Initial breakpoint set — REPLACES the current set before starting. Key forms: '<name>' (entry of any same-named table), '<uri>' (entry of that table), '<uri>#R{r}C{c}' (spreadsheet cell), '<uri>#rule' (any decision-table rule fires), '<uri>#<ruleName>' (specific rule fires). Append '@N' to any key to break only on the table's N-th execution (0-based) — e.g. '<uri>#R48C0@3' hits the 4th run; N matches frames[].instance and a watch series' instance, so a watch outlier at instance 3 is reached with '@3'. Without '@N' a cell breakpoint hits EVERY pass. | |
| includeTree | No | Also return the executed call tree's ROOT node ('tree'), not just the bounded 'profile' overview (default false). Against a current OpenL Studio the tree is lazy — one level deep: the root's steps each carry a 'childrenTotal' count instead of nested children, so a large run is no longer returned whole. Drill into a branch with openl_expand_trace_tree; to find the hot table use 'profile' and replay into it with a breakpoint. | |
| stopAtEntry | No | Suspend at the entry of the first frame (default true). Set false to run straight to the first breakpoint — or, with no breakpoints, to completion. | |
| breakOnErrors | No | Suspend on an uncaught rule error so its frame can be inspected (backend default true). Set false to let the error terminate the run. | |
| detailedTitles | No | Build value-rich business-view titles in the retained tree (backend default false). This can substantially increase response size. | |
| response_format | No | Response format: 'json' for structured, round-trippable data (default), 'markdown' for human-readable output, 'markdown_concise' for a brief summary (1-2 paragraphs), or 'markdown_detailed' for full details with context | json |