Commit 78f9222
Surface editor error context in log reads (#520)
* Surface editor error context in log reads
Editor and game logs now preserve structured error details, read visible Debugger Errors rows through logs_read, and clear those rows from clear_logs. Compact responses remain the default; callers opt into rich metadata with include_details.
* Address review: gate Errors-tab clear, full stack frames, cheaper polling
- clear_logs no longer wipes the Debugger Errors panel by default; the
Errors-tab clear sits behind a new clear_debugger_errors opt-in and
routes through the panel's own Clear button so the engine resets
error_count/warning_count, the "Errors (N)" badge, the errors_cleared
signal, and toolbar button states (a raw Tree.clear() left them stale).
- details.frames now captures every stack row. The real tree (verified
against script_editor_debugger.cpp on 4.3 and 4.6) lays frames out as
flat children with only frame 0 labeled "<Stack Trace>", so the old
per-child label match collapsed multi-frame stacks to one entry.
Detection is run-based, survives translated labels, and the test
fixture now mirrors the real layout.
- _entries_for_response shallow-copies on the default compact path and
reserves the deep copy for include_details=true.
- Debugger tree discovery scans only the cached EditorDebuggerNode
subtree instead of recursing the whole editor UI on every poll.
Live-smoked against a real editor (Godot 4.6.3): a real push_error row
returned all 5 stack frames; the opt-in clear reset the "Errors (1)"
badge and button states via the engine's own clear path.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: David Sarno <david@lighthaus.us>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>1 parent 6aa009e commit 78f9222
14 files changed
Lines changed: 906 additions & 82 deletions
File tree
- docs
- plugin/addons/godot_ai
- debugger
- handlers
- runtime/loggers
- testing
- utils
- src/godot_ai
- handlers
- tools
- test_project/tests
- tests
- integration
- unit
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
37 | 48 | | |
38 | 49 | | |
39 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
| 195 | + | |
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
200 | 207 | | |
201 | 208 | | |
202 | | - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
203 | 213 | | |
204 | 214 | | |
205 | 215 | | |
| |||
0 commit comments