• I have found a way to implement a command for opening an interactive console. It "works" with the current state of the pull request alone with three major gotchas:

    1. The pressed keys are not mirrored to the console
    2. History etc. does not work
    3. The debugger does not work

    1 and 2 work with these two changes:
    https://github.com/espruino/EspruinoWebIDE/compare/master...halemmerich:EspruinoWebIDE:emulator
    https://github.com/espruino/EspruinoAppLoaderCore/compare/master...halemmerich:EspruinoAppLoaderCore:emulator

    Do you think the changes in core and IDE would have unwanted side effects elsewhere?

    There seems to be a race condition somewhere that causes the result of the call (=undefined) and what is printed by the call to switch position. That causes occasional test failures. Do you have an idea how to get to the bottom of that problem?
    The demo app/test has saveMemoryUsage twice since more often than not the first one produces NaN because of this issue. Second one seems to always work somehow.
    The race seems to happening independently of the changes in core/IDE.

About

Avatar for halemmerich @halemmerich started