(Eventually) an implementation of the DebugAdapter protocol (used by e.g. Visual Studio Code) for Jint debugging.
Currently a hot mess. Not ready for production use - at all.
- Jither.DebugAdapter is a general purpose implementation of the DebugAdapter protocol.
- Jint.DebugAdapter implements the DebugAdapter for Jint.
- Jint.DebugAdapterExample is a small console app serving as an example (and testing ground).
- VSCodeExtension contains a minimal extension to interface VS Code with the debug adapter.
Planned (❌) and currently working (✔) - but not necessarily fully completed - features:
- ✔ Launch (run script in current tab of client)
- ✔ Attach to running script
- ❌ Attach to debuggee process and launch script
- ✔ Debug scripts accessible to client and debuggee via file system path (debugger client loads source from disk)
- ✔ Debug scripts only accessible to debuggee (debuggee provides source to debugger client)
- ✔ Dynamic loading of scripts (imported modules)
- ✔ Column breakpoints
- ✔ Statements
- ✔ Loop expressions (tests, for loop updates, left side in
for-in
/for-of
) - ✔ Function return
- ✔ Skips block statements
- ✔ Conditional breakpoints
- ✔ Break on
debugger
statement - ✔ Hit count breakpoints
- ✔ Logpoints (output log message rather than breaking)
- ❌ Break on exceptions (requires Jint exception overhaul)
- ✔ Step over
- ✔ Step into
- ✔ Step out
- ✔ Step points are the same as the possible breakpoint positions listed above
- ✔ Continue/Pause
- ✔ Terminate
- ✔ Disconnect (but keep debuggee running/detach)
- ❌ Restart
- ✔ Full scopes
- ✔ Display variables in selected call stack frame
- ✔ Lazy evaluation of property getters
- ✔ Lazy evaluation of structured types
- ✔ Display
this
(when defined) andReturn value
(at function return points) - ✔ Summary/preview of structured types (before expanding/lazy evaluation)
- ✔ Display type on hover
- ✔ Paged indices for array-likes
- ✔ Modify/set variables
- ✔ Evaluation
- ✔ Full call stack
- ✔ Current "instruction pointer" (position) in all stack frames
- ✔ Evaluation and "REPL"
- ✔ Console output (
assert()
,clear()
,count()
,countReset()
,debug()
,error()
,group()
,groupCollapsed()
,info()
,log()
,time()
,timeEnd()
,timeLog()
,warn()
)
- ❌ Probably still a few issues with threading and thread safety
- ❌ Proper client error handling
- ❌ Still some major issues with terminate/disconnect/restart
- ❌ Code in need of cleanup