9 Commits
Author SHA1 Message Date
西风逍遥游 42d9be4eed Merge remote-tracking branch 'origin/dev' into codex/test-suite-representative-tests
# Conflicts:
#	test/dap.cpp
2026-09-13 09:10:03 +08:00
西风逍遥游 b30cc67ccc fix(ci): bound ASan globals and DAP teardown 2026-09-13 09:07:18 +08:00
Cursor Agentand西风逍遥游 2fa181645c fix(devtools): avoid pause-on-caught-throw for raw VM DAP attach
DevTool::attach(HSQUIRRELVM) enabled sq_notifyallexceptions, so with
break-on-error the error hook paused at the throw site before catch /
reportError ran. That left a second pause hanging after one DAP continue
and flaked as SEGFAULT on Linux CI teardown
(devtools.dap.caughtErrorPausesAtReportSite). Keep notify-all only on
Runtime-bound attach (hook already capture-only there) and force-resume
in the test if the script thread is still paused.

Co-authored-by: 西风逍遥游 <sunxfancy@gmail.com>
2026-09-12 04:12:16 +00:00
西风逍遥游andCursor 6be64c3d9d feat(devtools): add EveScript LSP and name debugger call stacks
Move the language server into devtools, wire the VS Code extension, and show anonymous closures (eve_update = function) by frame prototype instead of a shifted CallGraph zip.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-03 00:58:22 +08:00
西风逍遥游 811eff1c3a ci(quality): warnings-as-errors gate, sanitizers, smoke, Python lint/tests
- EVENGINE_ENABLE_STRICT_WARNINGS option: MSVC /W4 /WX, GCC/Clang
  -Wall -Wextra -Werror, with documented noise suppressions and
  -isystem/-external:I for third-party headers; enabled on the
  Windows/Linux debug CI jobs.
- Fix warnings across engine, modules and tests exposed by the gate,
  including real bugs (incomplete-type deletes, Timespan microsecond
  overflow, overload hiding, enum switch gaps, dead code).
- Add Linux ASan+UBSan job, example smoke step, python-tools test
  job, ruff config (scripts+tools), weekly Linux coverage job and a
  CodeQL workflow.
2026-08-22 02:27:37 +08:00
西风逍遥游 f372842f87 feat(script): enrich script error handling and reporting
- Capture full call stack + throw-site in the Squirrel runtime error hook
  (new common/ScriptError.{h,cpp}) and surface it through ScriptException
  (line/column/function/stackTrace/reported accessors).
- Runtime installs its own error hook and drives execute() with a raw
  sq_call, fixing a null-deref when DevTool's hook replaces ssq's default
  runtime error handler.
- Compile errors now carry source line/column plus a snippet with caret.
- REPL/MCP/Debugger eval paths return the real error text instead of
  generic 'compile failed' / 'runtime failed'.
- Run() skips a second DevTool report for hook-reported script errors.
- ECS bootstrap compile/run failures are printed instead of swallowed.
2026-08-20 23:13:19 +08:00
西风逍遥游 33d5e5b870 devtools: DAP output events, variable inspect, error throw-site pause 2026-08-17 14:51:32 +08:00
西风逍遥游 8c8ac893f4 fix(devtools): correct Squirrel stack frame level for call stack and locals
The Squirrel native debug hook is invoked as a direct C call, so the top of the call stack (level 0) is the current script frame. The debugger, DAP adapter, and DevTool read locals/stack at level 1, which skipped the current frame: stackTrace omitted the innermost frame and the variables panel showed the caller's locals instead.

Read stack frames/locals at level 0 across Debugger::stackTrace, Debugger::locals, Debugger::evaluate, Debugger::scriptStackDepth, DebugAdapter variables requests, and DevTool local sampling.

Adds debugger_audit.cpp (breakpoint hits, stepInto/stepOver/stepOut, call stack at nested breakpoint, locals at breakpoint) and a threaded DAP end-to-end test that runs a real script and verifies the stopped event and the full call stack.
2026-08-14 21:02:30 +08:00
sunxfancy cee6eb0266 feat(devtools): enhance debugging capabilities with DAP integration and improved CallGraph
- Added support for DAP (Debug Adapter Protocol) in the DebugAdapter, allowing for better integration with IDEs like VS Code.
- Implemented new debugging commands: stepInto, stepOver, and stepOut, enhancing script execution control.
- Updated CallGraph to use a fixed ring buffer for event storage, improving performance and memory management.
- Introduced methods for resolving source paths and managing script aliases, facilitating smoother debugging experiences.
- Enhanced documentation to reflect new features and usage instructions for debugging tools.

These changes significantly improve the debugging workflow and provide developers with more robust tools for script management and error tracing.
2026-08-09 21:51:34 +08:00