Log In  

I hang out in the pico-8 discord #help channel, and a lot of the questions people ask boil down to "my code isn't doing what I want it to do... I don't know what to do. help?" If you feel completely lost when your code doesn't work, this tutorial is for you!

PRINTH is the single most helpful tool I know for debugging. When you're programming, often your head will get out of sync with the computer, and you won't understand what it's doing. The best way I know to bring them back in sync is to slap down some PRINTHs all over the place! Print out what your code is actually doing, and you'll eventually figure out what wrong assumption you're making.

To get PRINTH working for you, you'll need to be able to see the pico-8's output console. That's why we set up a shortcut to pico8.exe (at the start of the video). You can move this shortcut anywhere you want!

PRINTH itself can be a bit annoying to use, so I built a function PQ that makes it more friendly -- check out the source code! you're free to copy that second tab into any of your projects. if you find my functions helpful and you'd like to credit me, I'd appreciate it! but that's not required; feel free to use the functions for whatever you want

Here's the cart:

Cart #printh_helpers-2 | 2022-08-07 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
19

Let me know if you found this helpful!

P#90153 2021-04-08 01:39 ( Edited 2022-08-07 21:10)

1

Excellent tutorial! I'm surprised it's so easy to do, I'd expect you'd have to make some PICO-8 game to receive it.

P#93070 2021-06-05 20:16
1

This is quite useful thanks!

P#121381 2022-11-25 11:58

Can this be done on a mac?

P#139503 2024-01-01 21:51
1

yes, sometimes I use a mac and I open Terminal in the folder where pico8 lives and run ./pico8 (I'm unsure what the exact name is). then the Terminal window stays open and the printh output is shown in that terminal.

I'm not happy with that setup, there's probably a more convenient way to do it. but I'm hardly ever on mac -- someone else would be able to make better instructions than me

P#139627 2024-01-04 14:01

pq() is super useful, was looking for something like this. Thanks!

P#140818 2024-01-29 15:17

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 13:44:42 | 0.010s | Q:21