<!DOCTYPE html> <html lang="zh-cn"> <head> <meta charset="UTF-8"> <title>JS debugger调试</title> </head> <body> <script type="text/javascript"> // A debugger statement can be placed anywhere in the procedure to abort execution. Using the debugger statement is similar to setting breakpoints in your code. The //debugger statement aborts execution, but it does not close any files or clear any variables. for(i = 1; i<5; i++) { document.write(i); debugger; } </script> </body> </html>
Reference link: http://www.w3cschool.cn/javascript/js-debugging.html
Effect picture: