Stack traces on ESP8266: a GDB server stub
blog.cesanta.com
blog.cesanta.com
https://github.com/skorokithakis/tiny-ESP8266-breakout
If you want to just order one, here's a paneled PCB of the earlier versions (the only difference is pretty much the lack of a 3v3 out, plus the traces aren't as pretty): http://dirtypcbs.com/view.php?share=15302&accesskey=
Technical details: There exist some breakouts like this one[1], but they're crap, stay away from them. They don't include all the necessary pullups/pulldowns for the ESP to start running code, they don't include a capacitor and they don't leave room on the breadboard for connectors, so they're useless. My PCB fixes all these problems by adding 0805 10k Ω resistors, a capacitor and by being less than 2.5cm in each dimension.
[1]: http://www.ebay.com/itm/ESP8266-ESP-12-WIFI-UART-Serial-Modu...
http://dirtypcbs.com/view.php?share=16892&accesskey=996a11f9...
You can use it to program your RGB LED strips from your computer! Now you can finally have the entire apartment slowly change color to red in the hours before bed!
To expand upon my 4am ramblings:
There's two ways your code is going to fail, (a) Your Lua is going to die in a pcall (or friends); or (b) Your C/C++ (or similar) code has its front fall off.
In the former case, you just wrap with an xpcall and append your Lua callstack to your C++ callstack. Nothing fancy. You can of course go further, using lua_Debug to get the value of upvals and all that jazz.
However, in the latter case you have no guarantee that your application is in a sane state; you have no (solid) assumption that you can go the lua_Debug route, say from a segfault handler. You'll have to walk the callstack, and when you hit lua_whatever, prod internal state.
Both methods are really helpful. Say you're writing a game engine, knowing how to reproduce a catastrophic failure with a small Lua snippet, closes the feedback loop and make debugging a hell of a lot easier.
There's definitely a product and SaaS around this (much more expanded), with a Gitlab or Sentry business model.