The way I understand is that the IDE transmitts something on that Ctrl-c to Espruino. Instead of making only a Ctrl-c, could it be a button in the IDE? ...and Ctr-c - or later on - any other configurable thing would/could be a short cut? Ctrl-c may have some consequences depending in which environment one is and on what the current focus is.
For now, I would not even have a separate prompt: just the console, because from there a lot is already accessible:
get and set the value of variables
invoke functions
...and do other 'harm' ;-)
Btw, I was thinking that this entering into debug mode should also be something based on a pin changing state (triggered by a pressing a connected button). Actually very simple: it is already there: a setWatch(function(){ debugger },...); in the code does the job and has all the freedom of configurability - even to the point where a applicaiton oriented event can trigger the debugger... - I love Espruino...
Regarding the keyword statment debugger; - it is not shimmable or polyfillable. What about something E.bug();. I was also considering !; 'not' statment... but I have no clue about the ramifications and other potential conflicts arising from that. This are just some ideas.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Sounds like - actually IS - a very good plan.
The way I understand is that the IDE transmitts something on that
Ctrl-c
to Espruino. Instead of making only aCtrl-c
, could it be a button in the IDE? ...andCtr-c
- or later on - any other configurable thing would/could be a short cut?Ctrl-c
may have some consequences depending in which environment one is and on what the current focus is.For now, I would not even have a separate prompt: just the console, because from there a lot is already accessible:
Btw, I was thinking that this entering into debug mode should also be something based on a pin changing state (triggered by a pressing a connected button). Actually very simple: it is already there: a
setWatch(function(){ debugger },...);
in the code does the job and has all the freedom of configurability - even to the point where a applicaiton oriented event can trigger the debugger... - I love Espruino...Regarding the keyword statment
debugger;
- it is not shimmable or polyfillable. What about somethingE.bug();
. I was also considering!;
'not' statment... but I have no clue about the ramifications and other potential conflicts arising from that. This are just some ideas.