Trace analysis
MonaBase instruments supported stored programs and presents recorded execution in a debugger-style viewer. This is trace replay, not a live attached database debugger. The executed program can still have real side effects.
AI assistance is available for this feature. See the AI assistant guide for details.

Large programs, without a live debug session.
Section titled “Large programs, without a live debug session.”For multi-thousand-line PL/SQL programs where live DBMS_DEBUG debugging can become cumbersome or unstable, MonaBase records execution and replays it afterwards. Inspecting a completed trace no longer depends on keeping the target and debug sessions synchronized. This avoids that live-session dependency rather than promising a universal line-count or performance limit. MySQL uses isolated copies and explicit fixture rows for supported procedures, functions and triggers; its syntax and recording limits are described in the Trace guide.
A pseudo step-through that AI can inspect.
Section titled “A pseudo step-through that AI can inspect.”Recorded execution turns otherwise transient program behavior into evidence AI can read. With the trace, AI can follow repeated lines and loops in execution order, inspect captured values, and check your hypothesis against the recorded run—not just infer behavior from source. It analyzes a replay; it does not autonomously step or execute the database.
Database-specific behavior
Section titled “Database-specific behavior”Oracle
Section titled “Oracle”PL/SQL syntax and package/trigger context determine which constructs can be instrumented. Use the reported diagnostics for unsupported source.
PostgreSQL
Section titled “PostgreSQL”PL/pgSQL tracing has its own supported constructs. Native set-returning functions remain explicitly unsupported by the trace workflow.
MySQL records saved procedures, functions and triggers on isolated copies. Finish pending main-session edits before recording; read-only or unknown connections cannot record. This is replay of recorded native execution, not live debugging or an automatically safe production integration test. No original application rows are copied.
How to use this screen
Section titled “How to use this screen”- Choose a supported routine or trigger simulation and provide representative arguments in a dedicated test environment.
- Execute the trace workflow and wait for recording to finish. Inspect execution errors before interpreting the trace.
- Step through recorded lines, inspect variable values and compare branches. Save and reopen a trace when you need to inspect the same execution later.
Trace capture and target preparation
Section titled “Trace capture and target preparation”Choose the target and input before recording a trace against the database. Recording is distinct from replay.
| Control / setting | How to use | Effect |
|---|---|---|
| Target program | Select a stored routine, package member, or supported trigger. | Changes which program and input controls are available. |
| Compilation and source version | Inspect and, when necessary, compile the target source before capture. | The trace reflects that version; capture again after source changes. |
| Arguments and input | Supply routine arguments or the trigger event and row values. | Different input can change recorded branches, variables, and results. |
| Capture trace | Run the capture operation and review its result or errors. | Target code may execute against the database and cause side effects. |
| Recorded trace | Reopen a saved trace when the current screen supports it. | Review past steps without recapture; this does not restore current database state. |
Trace tab: playback controls
Section titled “Trace tab: playback controls”Once steps are recorded, use replay controls. These do not pause or step through a live database session.
| Control / setting | How to use | Effect |
|---|---|---|
| Start (F8) | Set a breakpoint, then start playback. | Searches recorded steps for a breakpoint; start may require at least one breakpoint. |
| Auto start | Use automatic replay where available. | Processes recorded steps without requiring a breakpoint. |
| Resume (F8) | Resume from the paused recorded step. | Advances to a subsequent stop or the end of the trace. |
| Step into (F11) | Move to the next recorded step. | Updates the highlighted line and variable snapshot. |
| Step over | Advance over deeper recorded loop levels. | Uses recorded loopPath depth, not live function-call control. |
| Step out | Advance until leaving the current recorded loop level. | Uses trace hierarchy information to choose the next step. |
| Stop (Shift+F5) | Stop the current replay. | Clears the active replay position without deleting the captured trace. |
Breakpoints and conditions
Section titled “Breakpoints and conditions”Breakpoints attach to recorded source lines. Right-click a line number to edit its condition.
| Control / setting | How to use | Effect |
|---|---|---|
| Click line number | Click a line number in the trace view. | Toggles a breakpoint; Mona style shows a paw icon. |
| Right-click line number | Open breakpoint conditions. | Configure a hit-count or variable-value condition. |
| Hit count | Enter a positive hit count. | Stops when the count condition matches; invalid input removes the condition. |
| Variable condition | Choose a variable name, operator, and expected value. | Stops when the recorded variable value matches the condition. |
| Comparison operator | Choose ==, !=, >, <, >=, or <=. | Compares numeric values numerically where possible; otherwise compares strings. |
| Save / Clear | Save or remove the breakpoint condition. | Changes breakpoint matching on subsequent replay. |
Source search, variables, and results
Section titled “Source search, variables, and results”Correlate recorded lines, variables, arguments, and output. Available panes vary by target and database.
| Control / setting | How to use | Effect |
|---|---|---|
| Find (Ctrl/Cmd+F) | Open search in the trace source. | Highlights matching lines in the displayed text. |
| Enter / Shift+Enter / F3 | Move to the next or previous search result. | Scrolls to matching lines; F3 applies while search is open. |
| Current-line highlight | Change the paused step with replay controls. | Highlights the corresponding recorded source line. |
| Variables panel | Inspect available variables at the current recorded step. | Displays the selected step’s variable snapshot. |
| Results / console | Review return values, output, and errors. | Shows capture results; clearing console output does not undo database work. |
Database differences and safety
Section titled “Database differences and safety”Separate capture from replay and check syntax limitations and database side effects.
| Control / setting | How to use | Effect |
|---|---|---|
| Oracle PL/SQL | Check instrumentation support for the target and syntax. | Some package or trigger constructs and conditions cannot be traced. |
| PostgreSQL PL/pgSQL | Check instrumentation support for routines and triggers. | Some constructs, including native set-returning functions, are excluded. |
| Trigger capture | Select an event and test row values. | Simulation/instrumentation conditions affect the captured trace. |
| Capture against a database | Use a disposable test database and test data. | Executed code may modify database state. |
| Replay recorded steps | Step through the captured sequence. | Does not require a live DBMS_DEBUG session and does not track current database state. |