I think this should be part of the curriculum - it’s a daily part of the job of a SWE, introduce it in the class, make it fun and explain the frustrations and rewards when figuring out bugs. It’s not a set back of the day, it becomes part of the day, another side adventure to solve.