Debugging in the Age of AI Isn’t About Fixing Broken Code

Marko Crnjanski

It’s no longer about fixing syntax errors - it’s about figuring out why a billion-parameter model did something totally unexpected.

Developers are facing a whole new breed of bugs and these aren’t syntax errors you can catch with a linter. We’re talking unpredictable model outputs, data drift, or hidden biases in training sets.

When your “code” is a neural network with billions of parameters, traditional debugging tools barely scratch the surface.

So, the real challenge has shifted from fixing deterministic code to making sense of probabilistic behavior.

To explore this, we spoke with Zvonimir Petkovic, Senior Software Engineer at Infobip.

AI-assisted debugging – helping hands or crutches?

When asked how AI is reshaping debugging, and whether it’s making developers sharper or just more reliant on automation, Zvonimir says it all comes down to mindset: it depends on whether a developer has truly embraced AI coding in a “vibe” way or not.

Regardless, AI tools often make debugging easier – even if you never tell Cursor to “pls fix this.”

But when AI is doing more of the heavy lifting in debugging, what happens to a developer’s critical thinking? Here’s how Petkovic sees it:

It comes down to mindset: for most people, the process offers a learning opportunity, but whether they actually benefit depends on having the time and will to dig in – or whether the project’s pace leaves no room for deeper exploration.

Why AI struggles with legacy code

When asked about the biggest challenges of using AI for debugging – particularly around accuracy and understanding context – Zvonimir points to one major issue: legacy projects.

Greenfield projects are easy, but try debugging a years-old, messy, poorly documented codebase, and it quickly turns into a nightmare.

Petkovic also noted that AI models have limits when it comes to context – they can’t always understand everything at once. That’s why context engineering is more crucial than ever.

We also asked Zvonimir how junior developers fare with AI-assisted debugging compared to senior engineers – does it speed up their learning, or risk slowing down their skill development? He explained:

GenAI has proven a major boost for juniors or developers transitioning to a new stack. In most cases, it helps them learn faster, without having to call a senior every time they hit a problem.

The dark side of AI autonomy? Bugs and tech debt

Debugging isn’t just about fixing bugs. It’s also about keeping code secure and products reliable. Zvonimir pointed out the risks of leaning too heavily on AI to automatically fix problems.

AI-generated code can quickly become a mess and a major source of technical debt if left unchecked and the same goes for automated bug fixes, especially when you push AI autonomy beyond what’s safe today.

He also warned about the risks of a Git-connected AI agent that automatically merges PRs and performs code reviews without a human in the loop. Today’s models are much more capable, but still far from fully autonomous.

GenAI coding assistants won’t replace your principal engineers

Finally, Petkovic shared his thoughts on whether AI can really grasp the intent behind code well enough to spot deeper logic or architectural bugs:

With enough context (code and docs) GenAI assistants won’t replace your principal engineers, but they can help them see problems from new angles and iterate faster.

Looking ahead, one big question is the balance between human and AI-driven debugging: could we ever reach a point where the process is fully automated?

It’s heading in that direction. GitHub is rolling out more AI-driven debuggers that not only triage problems based on code and comments but also attempt to propose solutions.

“With GenAI models becoming better and better, and with context improving with different sources expandable by the MCP, I see these becoming just better over time. Still, it’s hard to say how quickly they will be totally independent, even though some major companies are allowing this sort of action in isolated projects,” Zvonimir concluded.

> subscribe shift-mag --latest

Sarcastic headline, but funny enough for engineers to sign up

Get curated content twice a month

* indicates required

Written by people, not robots - at least not yet. May or may not contain traces of sarcasm, but never spam. We value your privacy and if you subscribe, we will use your e-mail address just to send you our marketing newsletter. Check all the details in ShiftMag’s Privacy Notice