I'm coming from the Laravel world and there's a great helper function I use all the time called 'Die and Dump'. It's perfect for debugging and I've been missing it so I rewrote it for pico8.
Wherever you are in your code put dd($variable) and it will work out whether it's a number, string or table and print it all out in a tree and then stop() the process. Colour coded per level in the array.
edit fixed bug rendering a single string