It's intentional that the board won't drop information if you're connected to USB - because chances are everyone would get upset pretty quick if data that was output just disappeared into thin air if it wasn't read for a second or two
The issue is that from Espruino's point of view it has no way of knowing the difference between:
USB connected, no app running on PC
USB connected, app running but busy and not reading data
USB connected, app running and reading data just fine (although arguably something could be added to detect a lack of movement of data)
About all I can suggest is to use a function called log that you set to log=function(){}.
When you connect with the IDE you can then write log = print
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.
Yes, this is a common issue: http://www.espruino.com/Troubleshooting#i-typed-save-but-espruino-won-t-work-or-stops-working-quickly-when-powered-from-a-computer-it-only-works-from-a-usb-power-supply-battery-or-the-computer-when-the-web-ide-is-running-
It's intentional that the board won't drop information if you're connected to USB - because chances are everyone would get upset pretty quick if data that was output just disappeared into thin air if it wasn't read for a second or two
The issue is that from Espruino's point of view it has no way of knowing the difference between:
About all I can suggest is to use a function called
log
that you set tolog=function(){}
.When you connect with the IDE you can then write
log = print