Live coding is not so much about the solution but more about the process. The students get to see the workflow a mentor uses, the shortcuts, what they do when encoutering errors, etc.
Remember to take it slow when you encounter an error (this is super difficult). Explain what the error says and what it means. Get the students to help you solve the problem. Think aloud when trying to solve the bug, this is mega important!!
The most important part of live coding is probably thinking aloud.
Make students come up with predictions for small live coding stuff. Fx What happens when we log this variable out. What will happen when we call this function.
Video about slowing down when encountering a bugs
A video about the problem with live coding: Will they actually learn from passively watching live coding?