The SQL debugger is the SQL Debug panel in the Editor. It shows how the editor reads the query in your console: its structure, its parse tree and the context at your cursor. Open it while you write when you want to check what the editor understands, or when you want a snapshot of that view to share.
The panel follows your work: it reads the text in the console and the position of your cursor. The editor builds this state only while the panel is open, so close the panel when you are done with it.
The Structure tab has the header Query Structure. It breaks the parsed query into five sections, each with a count of its entries:
The tab also summarises the parsed query: its type, its scope depth, how many SELECT statements it contains and whether it has correlated subqueries.
When a section has nothing to show, it reads No tables, No CTEs, No subqueries, No joins or None at cursor. When there is no query to read at all, the tab shows No query structure with "Start typing to analyze the query".
Each section opens and closes. Expand query structure viewer and Collapse query structure viewer open or fold the whole viewer.
The AST tab has the header AST Tree. It shows the parse tree of the query as an interactive tree:
When the editor cannot build a tree yet, the tab shows No parse tree with "Start typing to build the AST".
The CST tab shows the context the editor finds at the position of your cursor:
(empty) when there is none.(none).Move the cursor and the tab follows it. When the editor has no context for the position, the tab shows No CST context with "Move cursor in the editor".
. txt file instead. The file name is sql-debug_ followed by the time of the download, with colons and dots replaced by dashes.The snapshot starts with SQL Debug Snapshot and the time it was generated. After that it lists, in order: the SQL text of the console, the structure (including the tables that were visible), the parse tree and the cursor context. Parts with nothing to show are marked (none).
The snapshot contains the SQL text of your console. Review it before you share it.
No. It reads the text in the console and shows how the editor parses it. It never runs the query and never edits the console. To see rows, run the query and read the Results tab, as described in Run your first query.
The tabs stay empty while the editor cannot build a parse tree from the text. This happens when the console is empty, or when the SQL is not yet complete enough to read. Write or fix the statement and check the tabs again.
The AST tab shows the whole parse tree of the query. The CST tab shows only the context at your cursor: the trigger found there, and the keywords and names the editor can offer from that position.
The tab follows your cursor, so the context changes with the position. When the editor finds no context for the position, it shows No CST context with "Move cursor in the editor".
It lists the tables that are visible at the position of your cursor. When nothing is visible there, it shows None at cursor.
Yes. The panel reads the text in the console and the position of your cursor, so it updates while you write and while you move around the query.
The editor parses the whole query to build the debug state, and it does that only while the panel is open. Keep the panel open while you need it, and close it when you are done.
Yes. Use Copy all debug info or Download debug log and SQL, and share the result. The snapshot contains the SQL text of the console, so review it before you send it on.