We are going to use our new own programming language. We have designed grammar, json parser and everything seems to work.

Code in my language is transpiled into javascript and interpreted by node.js (server side part) and by chrome (client side part). Now I'm experimenting with Ace editor as IDE. It has highlight and code completion features for custom grammars.

Now I'm thinking about debugging. What possibilities I have to manage the breakpoints in attached node process and in browser and is there any chance to get variables values (for "watch variables" feature in my IDE)?

And what about callstack? Probably there is some protocol for communication with node in debug mode, but how to do it with browser for client side debugging?

closed as too broad by amon, 8bittree, JimmyJames, gnat, MetaFight Dec 22 '17 at 20:21

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.



but how to do it with browser for client side debugging?

you may want to have a look at amasad's debugjs

And also relevant, I believe, there is this short academic paper which introduces a "debuggable interpreter design pattern" in page / section 3:


Not the answer you're looking for? Browse other questions tagged or ask your own question.