So how do you debug an Arduboy game?

so in my day job I can run my code in simulation inside gdb, or use printf on a serial port, or attach a kernel debugger over serial cables if things go really bad, but how does one debug with the arduboy short of using arduboy.print() on the tiny screen?



Speaking from general Arduino experience, and not any Arduboy experience, you often debug with print statements, but to the serial port. Then you can open a serial console on your connected computer and see the output. I’d like to think that the same will still work with Arduboy. The Arduino environment (and codebender, for that matter) has a built-in serial monitor program. You can also use any software (e.g. terminal emulator) that can take input from a serial port.


The usual path in debugging a C/C++ program would be to use gdb. Embedded devices can be a challenge. So… we have I haven’t tried using this with a microcontroller, and there are probably other solutions. Your best bet in any debugging that at all involves see situation is to look to GDB, so try googling “arduino gdb”, “avr gdb”, “avr-gcc gdb” etc. Somewhere you find a solution to step through your program and view the registers, view code as you step, that sort of thing, which is all built into gdb.

If anyone tries it, please share your results. :thumbsup:

right, I had done that as well in the past, but I didn’t seem to get any output on the serial console with the Arduboy, perhaps it’s not setup for that, I don’t know… or maybe i need to use stderr or some other fd, I think i was still using stdout at the time that I tried it…

1 Like

Serial output (and input) over USB works with the Arduboy.
Here’s a simple demo sketch:

#include <Arduboy.h>

Arduboy arduboy;
int count = 0;

void setup() {

void loop() {
  arduboy.print("Count = ");

  Serial.print("Displayed count: ");


1 Like

It is actually possible to use an in series circuit programmer and use AVR toolchain with their debug process. You can step through code and set breaks and all that stuff you can do. You’ll have to crack open the case and solder to the pads, but they are all there for you!

1 Like

That’s kind of neat. Is it a shield or something? I remember hearing about a hardware debugger, but I didn’t know if you had to build it or if there were products available.

Is this link on target Kevin?

Hi all,

Hoping on this train mighty late, but whatever I do I can’t get Serial to print to the Arduino IDE console. I’m brand new to Arduino and would consider myself a hobby programmer at best, so ELI5.

Here’s my code:

  void setup() {

Arduino for Atmel Studio 7

It doesn’t print to the console, it prints to the Serial monitor, it’s the button on the top right of the IDE that looks like a magnifying glass. Or something. Start it before you launch the game and make sure the baud rate is correct and everything should just pop up there.

:grinning: Awesome thanks!!!