You would need to debug but can you tell if a person just printed to the console or used advanced tooling?
Can you tell how long they wasted on the debugging aspect?
Nope. That's the problem. These are soft skills that are hard to teach but much harder to test.