Debugging
Debugging
What is debugging?
- The process of finding and fixing errors (bugs)
- A large share of coding time goes to debugging
- 'Problem solving' is the core skill
Once debugging becomes second nature, the questions you ask during development change. Instead of the vague 'Why isn't this working?', you start narrowing the scope: 'It works up to this step and breaks from here.' The basic routine is a four-beat cycle of reproduce → isolate → hypothesize → verify, and reproduction is the first thing to fall apart. A symptom that looks different every time is a sign you shouldn't change anything yet. Start by pinning down the conditions.
Errors fall into three broad groups. Syntax errors stop the program from running at all, so they are actually the easy ones. Runtime errors blow up only with certain inputs or certain file sizes. The most expensive are logic errors: the program runs without a single error, yet the calculated result is wrong, and no one knows until someone checks the numbers by hand. Testing and QA establish that 'there is a bug,' while debugging is pinpointing the cause and fixing it, and that is where the two roles differ.
When you hand debugging to AI, include three things: the steps to reproduce, the full error message, and the name of the file where the problem occurs. Copy the error message whole rather than summarizing it. The file names and line numbers in the middle of a stack trace are often more decisive clues than the last line. Apply fixes one at a time so you can tell what actually worked.
The most common mishap on the job is the expectation that 'AI will just fix it.' Tell the AI only 'it doesn't work' and it rewrites the code on a guess, changing features that were running fine. Even riskier is mistaking a vanished error for a solved problem. Add code that catches an error and silently swallows it, and the screen looks clean while wrong data keeps piling up. If you don't save a point you can roll back to before changing anything, by the third fix no one remembers what the original code looked like.
Seungtae ParkHands-on AX instructor who teaches AI business development and marketing automation by building real systems
John KimInstructor John Kim, CEO of Nanum Consulting and author of “B2B Marketing Design”The term 'bug' is widely linked to a 1947 anecdote in which Grace Hopper's team found an actual moth in a computer, and removing errors came to be called 'debugging.'
Let’s look at a hypothetical case: Company A, a household goods distributor with 40 employees. The operations team used vibe coding to build an in-house tool that automatically tallies month-end settlement files, but for two weeks running, clicking the upload button did nothing. Every month-end, two people spent two days filling the gap by hand.
- At first, Kim on the operations team told the AI only, 'The button just won't click.' Kim applied four different fixes it suggested, but the symptom stayed the same, and the totals display even broke.
- The team lead had them rewrite the reproduction steps from scratch. Once it was pinned down as 'Upload the December settlement Excel file (3.2MB) and the screen freezes after 3 seconds,' it became clear that a 1MB test file uploaded without a problem.
- Kim, the assistant manager, opened the browser console and, instead of summarizing the red error, copied in all 12 lines verbatim. The AI immediately pointed to a single setting line as the cause: a 2MB upload size limit.
- They fixed one thing at a time. They raised the limit to 20MB, saved, and checked it, then handled the waiting screen that had caused the “it looks frozen” misunderstanding separately by adding a progress indicator.
- The month-end settlement that used to take two days dropped to 40 minutes, and repeat questions about the same symptom went from 3 a month to 0. Afterward, the team wrote down a rule: only ask the AI a question with the reproduction steps and the full error message attached.