Comments (3)
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.
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.
This is in the VSCode marketplace now:
from effectfuljs.
Related Issues (20)
- Blocking breakpoints
- corejs integration
- jsdom integration
- dynamic imports
- WebWorker data URLs
- console.time
- PnP modules loading
- Jest zero config
- Inline more runtime operations
- Lazy instrumentation
- Data breakpoint
- `with` statement implementation
- changing parent scope in `eval`
- Stepping into setters/getters/Coercions/Proxies etc
- Completion, expressions result for side effects free exceptions
- Proper hot reloading
- Breakpoints sometimes not work HOT 2
- @effectful/serialization does not work in browser because `global` is missing HOT 4
- Conditional debugger breakpoint? HOT 16
- Function breakpoints
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from effectfuljs.