Shut Console.log with unplugged usb by code? #937
Replies: 3 comments
-
Posted at 2017-06-09 by @gfwilliams It'll only happen for you if the board is powered from a PC (so there's an active USB connection) - if it's powered from a USB wall supply or any external power then it won't be a problem. You can move the console to something like Loopback with Of course the other option is just to do |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-09 by Mrbbp hum, i'm a bit confuse
in the code... to avoid the buffer pb (or need to open the webide)
in the console in the webide, if i want the log back? regards é. |
Beta Was this translation helpful? Give feedback.
-
Posted at 2017-06-09 by @gfwilliams Once you move the console with Ideally you would call it somehow from within Espruino. Eg.:
Then when you press the button you get control back. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2017-06-09 by Mrbbp
Hello.
I use console.log for debugging purpose, when the board is unplugged but powered, the prog stop after a while because of the fullness (sorry for the word) of the buffer.
Is there a way to kill output if usb is unplugged? (I'm a lazy guy and don't want to comments all my console.logline.😱)
I suppose there is something to write in the onInit()...
Many Thanks
é.
Beta Was this translation helpful? Give feedback.
All reactions