Debugging training?

Helping people on the forum, I’m often struck by the lack of basic debugging skills. I’m amazed how many people don’t know how to use the console to help debug.

It might be helpful to have a simple submodule on basic debugging skills. Or at least a link to materials with a strong recommendation to use it. Even a link to someone else’s youtube video would help.

1 Like

Yes, I’m surprised why the use of console.log isn’t mentioned as the first thing.

First lesson to arrive is jQuery… then Javascript… a mention of how to use console.log can be found on “Back End Certification”

I think the whole approach is !SDRAWKCAB

There’s a debugging section in the beta version. Back in “the day”, FreeCodeCamp linked to the CodeSchool devtools course, which is free. Since the goal is to be a self-contained course, the link has since been removed (it’s outdated, anyways).

Debugging is something I’d like to get better at myself. I mostly just output to the console and very rarely use a debugger.

1 Like

I don’t think I’ve ever used a debugger outside of class. Logging to the console is pretty much all I do. I should probably learn some new tricks, but it works 99% of the time.

Someone showed me this cool debugging tool:
http://pythontutor.com/javascript.html#mode=edit2
It lets you see all the variables’ values real-time as you step through your code.

1 Like

Yes, logging to console is 99% of my debugging too. But I’m talking about people that don’t even know how to do that. I’m talking about people working on some API call, they ask why it isn’t working, so I load up their pen and find five error messages in their console - clearly they’re not checking there.

I’m envisioning a little video that goes through some simple JS code what is not working and showing how one would go about figuring out what the problem is. Maybe if I ever get some time I can do it. Or someone probably already has a video that fCC could link to.

i always use any means i can to debug and understand my code … mostly chorme dev tools … but repl is great for console.logs as you dont need to open the console and phytontutor is handy for basic stepping through code.
I realized the importance of debugging when i did a course a few years ago … Embedded systems change the world on edx … course was in C and taught how to code micro controllers … thing is i knew nothing about coding then … had being messing with arduino and someone suggested i try the course as i might learn a bit about code that would be useful. Only for the great debugging program i wouldnt have being able to do the course … but i manged to to code/debug my way through the whole course (except for last section interrupts )

Only problem i have now is figuring out how to debug server side … console.log is a pain server side as it just dosent give me a clear enough picture … i really want to step through code line by line

Every now and then I’ll talk about debuggers in the chat and get a snooty young whippersnapper lecture me on how real developers don’t use debuggers and should just use console logging. :sweat_smile: (Meanwhile, back on the farm… when I worked my first job and didn’t know how to use Eclipse’s debugger tool my mentor shouted “What the hell are they even teaching you?” to all the college interns in the office.)

1 Like

I didn’t mean to imply that there is anything wrong with using debuggers beyond the console. But I think the campers here should at least know how to use the console to do the most basic debugging.

:slight_smile: I didn’t take it that way @ksjazzguitar. I was just reflecting on past experience. A lot of time, especially when you’re working on stuff like the FCC algorithm challenges, console debugging is the way to go.

1 Like

I just got into debugging recently
I find it a bit strange because it can improve my programming skills by multiple times just by adding few new habits to my working routine. I reccomend anyone who wants to get more into debugging to go over these articles: