Debug capabilities

I’d like to hear thoughts on debugging improvements. I’m writing/debugging on an iMac. I’ve written a method to display error codes on the LEDs (so I can at least see something I’ve specifically included for error handling) but I’d like others to jump in on thoughts. What I’m doing is on error, it halts, displays a recognizable pattern on the 6 LEDs and waits for me to press the button. Upon which it displays each error code digit (MSD, one at a time) on the specific LED corresponding to the digit (works for 0-255). It would be great if this sort of capability (or something better) was built-in to the underlying code.

I’m discovering other helpful methods that I’d like to see as part of the base code and would encourage others to add those thoughts too (here).

2 Likes

I was having similar thoughts. Without having figured out a reasonable way to write tests, it’s all trial and error. Without having a good way to debug, simple problems take weeks to figure out (because it must be trial and error, and simply analyzing the code). By the time I got a semblance of the basic functionality I wanted in my game, I was so relieved and elated that it took me another week to want to touch it again to figure out why the information isn’t propagating correctly between them. Bad data storage technique? Bad data retrieval technique? Bad datagram encoding? Bad datagram transmission? Bad datagram decodcing? Bad data storage on the receiving end? Nothing even slightly right? I have no clue.

So, from the lack of responses (and only 1 like before mine), I’m guessing nobody’s made progress on any meaningful debugging utilities. I know my attempts have been rather inadequate. Still, I’d welcome ideas, new or old!

Hi @zefquaavius,

I’ll be curious to hear others weigh in on this. Interestingly enough the early beta developer kits (the ones that are open on the top) have a single Blinks with a Serial output so you can print information back to the computer’s console. In practice, I find myself making little tools to help me debug such as a single Blink that reports the value seen on faces to validate that the messages I am expecting are being sent. I know in a similar way that @gapMindful built a color tool to choose their colors, we often build small tools to validate pieces of our code. The developer tools are evolving and this feedback is helpful. I think there is something nice about creating tools in the process of creating an experience or game, much like building a level editor might be part of the process for a video game, but also understand the current tools have room to grow. Also, please feel free to reach out or share code and I am sure someone will take a look and offer a helping hand :slight_smile:

1 Like

Hi, @jbobrow!

Simply awesome creation, by the way.

I actually had an epiphany of a simple thing I could do in this instance to give myself some debugging information. Thankfully, the communication (at least with a standard, optimal connection) seems to be working perfectly, and the problems lie elsewhere. But I was stumped for weeks just trying to think of any next step. And each time you hit a problem whose solution isn’t apparent, you have to spend time developing a custom way to communicate some useful form of debugging info for that one problem. Each bug becomes a spinoff project. An interesting challenge, sure, but it can be a real showstopper.

For what it’s worth, I did finally post last weekend about my project, but nobody has responded to it yet. :sweat_smile: But with the findings from my weeks-overdue debugging idea for this one situation, I am finally, once again looking forward to my next steps, rather than just feeling… stuck.

I think it could be super-helpful to offer a Blink-compatible little debugger display, and add something like sendStringOnFace() to the API. The debugger display’s whole job would be to listen for a datagram with text to display, and scroll that text until it gets a new message. I’d buy that tool if the price were reasonable enough! :slight_smile: It would only need to have Blink magnets and comms on one face, although I’m sure it would be nice if it could be in a Blink housing, so you could debug even in a dense layout.

Thank you for taking the time to reply! For now, I have next steps, thanks to the custom debugging approach du jour, and I’m back on track to get my ambitious first game to the first, most basic playable state. Heh heh.

P.S. My bad! Two people replied days ago. Somehow I didn’t see that! That’s encouraging, too. :slight_smile:

1 Like