GithubHelp home page GithubHelp logo

User space debugger about effectfuljs HOT 3 CLOSED

awto avatar awto commented on May 26, 2024
User space debugger

from effectfuljs.

Comments (3)

YuriGor avatar YuriGor commented on May 26, 2024

As I see possible API

it should be something like deep iteration over source code tree with calling some callback on each step.
This callback should receive all the possible meta info, like line number, character position, call/closure stack with all the available variable to watch and possibly to modify
If the callback returns false - then stop the execution, if true - do next step.
It's the lowest level. Like eachDeep

Some higher order component will handle all the debugging meta with (conditional)breakpoints, implement debugger commands like a step into/step over/run/pause/stop.
Like filterDeep which is implemented over eachDeep.

So it will be really exposed debugger API.

Each async portion of some execution will be like a separate tree walking,
in case of parallel debugging sessions spawned by some async reason, we need some session id to keep some session-related stuff, so it will be able to for example remember starting point of 'step over' and correctly pause the execution on exit from deeper execution branch.

And UI should render all this

from effectfuljs.

awto avatar awto commented on May 26, 2024

Packed an initial version of the transpiler into @effectful/debugger, there is no yet runtime, but it will be tiny as well.

Here is sample output in jest snapshot which should give some clues about how it is supposed to work. It was generated from code.js random file.

Both transpiler and runtime a simple and small so it is easy to implement any API using them.

from effectfuljs.

awto avatar awto commented on May 26, 2024

This is in the VSCode marketplace now:

effectful.debugger

from effectfuljs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.