Block-based programming platforms like Music Blocks help beginners learn coding through music, but debugging errors in such programs is often difficult for learners. This project proposes an AI-powered debugger for Music Blocks that automatically identifies errors, explains their causes, and suggests possible solutions in simple language. The system uses artificial intelligence techniques to analyze block-based programs and provide real-time feedback to users. By integrating AI with Music Blocks, the proposed debugger reduces debugging time, improves learning efficiency, and enhances creativity in music programming. Experimental evaluation was carried out in a real educational environment that showed the proposed approach significantly reduces debugging time, program correctness, and improving the engagement of learners. It seems that AI-aided debugging would very effectively support music education, strengthening computational thinking and deepening programming concepts in inexperienced learners.