• On the STM32 I use a discovery board as an 'ST-Link', and then debug with GDB - docs here: http://www.espruino.com/AdvancedDebug

    However I only do that rarely. An awful lot of Espruino can be compiled natively on Linux and debugged very easily from there - sometimes you can fudge embedded code to run straight from Linux itself. You can also get away with quite a lot by looking at the lst file to find out the addresses of symbols and then using peek32 from Espruino itself to check out how those variables are changing over time.

    But on ESP8266 I'm not sure what's available - you'd probably need some kind of JTAG connection to it to debug properly... But my experience has been that even on relatively mature platforms, debugging tools really suck.

    It might be easier for you to hack up some kind of simple 'ESP8266 test harness code' that runs on Linux and emulates the calls the ESP8266 SDK has - after all, sounds like most issues aren't XTENSA related - it's just how you interface to the API.

    Nice side effect of running under Linux is that when you 'exit', Espruino can run a memory leak check that can be really handy.


Avatar for Gordon @Gordon started