👋 I’m Nathan

I still don’t know how to use a debugger

⭐️ a blog post

Illustration of plants and a bug with a little sign reading 'no bugs'

Since I wrote my first javascript in the computer lab at my High School in VA using Windows 95, I’ve subscribed to the println debugging standard practice. Of course then it was alert. Either way, if there is a problem, add print statements everywhere.

Well, it’s time I finally learn how to use a debugger. The reason: I wasted two entire days.

Do you use a debugger? Do you have any tips or tricks? How can I break the habit of console.log or IO.inspect or println or whatever?

Why now?

You see, I really like erlang and elixir. I am playing around with spawning processes and communicating with them for a bit. Erlang has an insane concept called “ports” (nope, not those ports) and after learning more about it I really like them. You use stdout and stdin as binary pipes to communicate back and forth. If anyone breaks either pipe, then everyone shuts everything down. It’s a great way to know™ you won’t have zombie processes.

Well. console.log writes to stdout. Of course, right.

I broke my binary communication protocol by attempting to debug a problem. Because I don’t know how to use a debugger. And, honestly, I fixed this problem by continuing to be ignorant and appending log lines to a file instead.

So yeah, I’m frustrated. Again, my lack of CS skills has caused me problems. Very rarely do I wish I were a “traditionally trained” programmer, but this is one of those times. I am going to finally learn this. Eventually. When I get time.