I don’t know that an editor discovers bugs, per se. I use VS Code which is pretty good and free. If it’s a web page, then learning to use the console debugger is a big thing. Other than that, debugging is just a skill that you learn. I suppose a good linter in your editor might catch some bugs too.