• Sun 2021.03.14

    It is likely that there is a small amount of delay during the upload that Espruino requires to unpack and manage memory, and the debugger becomes initialized after the testDebugger() function call.

    By placing a small delay within your snippet, it is possible to launch immediately after the upload is complete.

    function testDebugger() {
      debugger;
    }
    
    intervalID = setInterval( function (){
    
        testDebugger();
        
      }, 1500);
    

    Edit:
    In my haste to reveal a working solution, I actually needed to test some more. The use of
    L5 timeoutID = setTimeout( function (){ as pointed out in post #3 is a better choice to make just one and only one call to invoke the debugger


    Result:

    >
            debugger;
            ^
    debug>
    
About

Avatar for Robin @Robin started