Debugging in the Dark: How Clinical Thinking from Interventional Radiology and KIRO AI Helped Me Fix a HarmonyOS Bug
A few weeks ago, I ran into a frustrating problem.
I was working on a mobile application used by large-scale industries, and we started receiving multiple complaints from users on HarmonyOS devices. The issue was consistent — something was breaking — but I had one major limitation:
I didn’t have a physical HarmonyOS device to reproduce the issue.
That meant I was debugging in the dark.
An Unexpected Conversation
Around the same time, my wife had just been transferred to a new hospital unit: Interventional Radiology.
One evening, while I was picking her up from work, I asked what her new unit actually does.
She explained it in a simple way:
“Instead of performing open surgery, doctors use real-time imaging like CT scans or ultrasound to guide instruments inside the body.
They can see exactly where they are going — and fix the problem with precision.”
That stuck with me.
The Moment It Clicked
As I was driving home, my mind kept jumping between two things:
- My debugging problem (no device, no reproduction)
- Her explanation of scan-guided precision
Then it hit me.
“What if I could scan my codebase the same way they scan the human body?”
Instead of blindly guessing where the issue was, I needed a guided, diagnostic approach.
Applying the Idea
So I tried something different.
I used kiro-cli alongside Amazon Q to deeply analyze the project — not just at the surface level, but across dependencies, platform-specific conditions, and compatibility layers.
kiro-cli helped me scan the structure of the project and uncover hidden inconsistencies, while Amazon Q acted like an intelligent assistant — helping me reason through platform-specific behavior, identify suspicious patterns, and validate assumptions quickly.
Just like a radiologist uses imaging to pinpoint a problem area, I used these tools to:
- Identify HarmonyOS-specific incompatibilities
- Trace execution paths that behave differently on that platform
- Detect subtle issues that wouldn’t show up in standard testing
- Validate fixes faster with AI-assisted reasoning
And there it was — the root cause.
A small but critical platform-specific issue that I would’ve struggled to find manually.
The Result
I fixed the issue without ever touching a HarmonyOS device.
And more importantly, I changed how I approach debugging:
- Less guessing
- More guided analysis
- Leverage AI tools effectively
- Think like a “diagnostic system,” not just a developer
What I Learned
In Interventional Radiology, precision comes from seeing clearly before acting.
The same applies to software engineering.
Modern tools like kiro-cli and Amazon Q are not just productivity boosters — they are like diagnostic scanners for your codebase.
Sometimes, the best solutions don’t come from more effort —
they come from seeing the problem differently.
Final Thought
Inspiration doesn’t always come from within your field.
Sometimes, it comes from a conversation in a car… after a hospital shift.


Comments
Post a Comment