You are reading a single comment by @dgk and its replies. Click here to read the full conversation.
  • Seems the espruino tool doesn't have a way to start a terminal session in the same command right after an upload (and save)? so I've been running a second command right afterwards and that's what has been throwing the error whenever save is called

    I did use the suggestions from the link you provided to that was helpful.

    import {app} from './app.js'
    const PRODUCTION = false
    
    // this will be called on power up, if code was saved
    function onInit(){
      setTimeout(app.call(null,opts),PRODUCTION?0:5000)  // wait for possible terminal connect
    }
    
    setTimeout((PRODUCTION)?save:onInit,1000)
    

    So I guess my question is how does one start a terminal session after upload (no save) in order to see the beginning stdout output. Alternatively I suppose I could send stdout tee'd to a file and view the file after connect (I have no clue how to do that on esp32)

    I guess in general I'm used to my nodejs 14+ coding degugging/workflow under linux (i.e. full sbc running linux and nodejs) so I have some learning regards rolling up of es2017+ and then debugging and logging code on the esp32 device. Although the webide is fine I'm only interested in using my dev IDE's that being Atom and VsCode and writing in 2017+. That explains why I am using the cli directly.

    Thx for you input @MaBe

About

Avatar for dgk @dgk started