Debugging simply means fixing bugs and improving performance. It is necessary to debug your frontend code because you may want to optimize your code and improve the user experience. Moreover many times we write messy code and add lines that are not that necessary so we can improve that. Hope that helps. 😄