Just to add: the setWatch could still be there - you can type dump() when connected in the IDE and see if a setWatch is reported.
dump()
setWatch
One option is that you may be getting an error before the watch completes. For example:
var x = 0; setWatch(function() { x++; ... },...);
works fine, but if you'd called delete x then x++ would create an error and stop execution.
delete x
x++
@Gordon started
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.
Just to add: the setWatch could still be there - you can type
dump()
when connected in the IDE and see if asetWatch
is reported.One option is that you may be getting an error before the watch completes. For example:
works fine, but if you'd called
delete x
thenx++
would create an error and stop execution.