> You can't debug something just by reading the code.
You are doing those junior engineers a disservice with this message.
I'm usually trying to go in the other direction with them - you don't need to be able to reproduce it yourself or see the log files to narrow down or find the cause of an issue.
Logs/etc are just additional tool that make it easier.
Lost track of how many juniors I've seen throw their hands up and say they can't progress because they don't have logs/clean repro
> Lost track of how many juniors I've seen throw their hands up and say they can't progress because they don't have logs/clean repro
Not the parent, but I think their approach is the correct one even though their line that you quote "You can't debug something..." should be everything instead of something.
The issue with your juniors is them throwing their hands in the air without actually reading the code when they hit a wall, and not them trying to reproduce and inspect the bug first.
What's the issue with telling them, "Obviously if you can't reproduce it and inspect it with dev tools, read the code."?
I've won bets off devs who blamed me cause they said they couldn't reproduce the bug consistently when they tried but it would happen randomly in production. Mind you, the bet wasn't even about who was at fault. The bet was that I could reproduce it if I actually tried.
You are complaining about juniors in a role that's known for the motto "it works on my machine" of course they're going to whine the moment it takes some effort to reproduce something.
At the end of the day, how are you going to claim you fixed an issue if you can't reproduce it to begin with? The senior has to now read the code more carefully cause there is no proof the junior actually fixed anything.
I'm actually not complaining. I coach them through it, but the primary help I give is showing them how to walk through the code, and break the dependency on logs/repro scenarios.[1]
In addition, if you find the issue in the code -- unless it's a really unusual race condition -- you have what you need to construct a reproduction scenario. That's also part of the coaching.
[1] At least, I did until the place I work switched everyone to vibe coding. Now I give terse responses to their LLM-generated PRs -- which usually misses the forest for the trees -- since I know that they're just going to feed my words back into the machine.
I really disagree with this approach to debugging
It's a good approach if every run of your code is very slow or very expensive, but if you can iterate quickly by running the code it's way more effective to try to reproduce and narrow it down that way
I think you've been doing your juniors a disservice