Why would you have to debug generated code? Let the LLM debug it.

And how do you know it did it right?