-
Hi @Gordon,
I attempted to use debugger() within a function invoqued at load time and found that the remaining of the uploaded file was "used" or, may be "consumed " out of the file being uploaded. This is not what I intended...
Is this behaviour "normal " ?
How can I debug in such a case?I subscribe to an automatically generated document, knowing that this forum, and now gitter discussions, do contain useful informations, about all the oddities any user might face.
See Troubleshooting - specifically : WHEN I TYPE dump() THE CODE THAT IS DISPLAYED ISN'T EXACTLY THE CODE THAT I ENTERED
But it's worth reading through all the language stuff there anyway, and also the Notes page
(sorry for the caps, it's the way the titles copy+paste :)
Basically when you click 'upload' your script is executed on Espruino - it's not stored. When you say
save
it saves away the current state of everything. That's actually really important difference between Espruino and other things.Perhaps there should be links, but lots of things lead you to
onInit
/E.on('init',...)
- for instanceload
,save
, and all the stuff above. Generally you will have found out aboutonInit
because of those.