Not much familiar with the context, but if serial gets stuck or a like, check where the console goes. Give it another try after removing the console.log()s. There are ways to direct the console somewhere else. (console, connected, hang, etc.)
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.
Not much familiar with the context, but if serial gets stuck or a like, check where the console goes. Give it another try after removing the console.log()s. There are ways to direct the console somewhere else. (console, connected, hang, etc.)