Debugger/Stepper
- Dominant language
- JavaScript
- Stars
- 507
- Forks
- 45
- Avg merge
- 11h 22m
- Merged PRs (30d)
- 4
Description
It should not be that hard to add a debugger and stepper. The starting point is in continuation branch. Which look like this:
```javascript
let steppers = {
enter: noop,
leave: noop
};
// -------------------------------------------------------------------------
/* istanbul ignore next */
function step_evaluate(code, args) {
return unpromise(steppers.enter(code, args), function() {
return steppers.leave(evaluate(code, args));
});
}
```
And the API should allow to set enter and leave callback functions that should return a promise that will pause and restore the evaluation.
TODO (braindump):
- [ ] stepper hooks
- [ ] stepper run/stop (to ignore stepper hooks)
- [ ] a function `(breakpoint)` that will stop executing at a given code
- [ ] API to expose internal list structure of code into a callback
- [ ] API to add the breakpoint at S-Expression (by passing an internal pair object)
- [ ] stepper will be triggered when there is a flag on pair (code argument)
- [ ] hook that trigger debugger (enter stepper mode)
- [ ] `(breakpoint)` can be a macro that will return a list that has a stepper flag
- [ ] expression stack visualization
Contributor guide
Assessment
This issue has not been assessed yet.