Builtin debugger PoC
Early PoC to introduce builtin debugger into Tarantool console.
Based on https://github.com/slembcke/debugger.lua.git
It's not yet enabled via command-line -ldb (as in Redis debugger), but need to be activated manually via require 'debugger'()
https://gist.github.com/335357f394c7d984090c9fe1c7319a45
TODO
- [ ] Integrate Debugger into Tarantool shell script;
- [ ]
-doption to activate debugger mode; - [ ] switch between debugger and standard REPL via some commands;
- [ ]
- [x] Tarantool Debugger launcher;
- [x] Fix broken single step 'n';
- [ ] Fix debug.debug() hanging in Tarantool (i.e. use standard
console.cfacilities to work with readline API); - [x]
breakcommand via single-line steps;- [ ] fix step_over after ffi calls;
- [ ]
breakcommand via HALT patch (flush jit generated code, modify bytecode, disable JIT); - [ ] ~~vscode exension calling default debugger scenario (my debugger.lua);~~
- (we still need something for remote networking);
- [ ] plan A: implement DAP in Lua, create extension using it:
- [ ] in vscode;
- [ ] in vim;
- [x] plan B: modify local-lua-debug extension to debug Tarantool. (vscode-tdbg launcher)
- [x] convert ffi code to LuaC to retrieve
@builtinsource code;
- [x] convert ffi code to LuaC to retrieve
Not a goal (yet):
- [ ] remote debug (modified moddebug.lua);
- [ ] vscode extension calling moddebug.lua;
Coverage increased (+0.01%) to 85.115% when pulling 6e4f686aa4a9f74081e552b057ec8d836f62a03a on tsafin:tsafin/debugger-poc into 215630e6f6c429f96c7d210b200d9d241c374f9a on tarantool:master.
Close, as parts of this branch have been extracted to separate pull-requests.