chrome断点调试

1. 

   在编写JavaScript代码时,如果

出现了bug,就要不断的去找错误,如果console控制台中提示还好说,可是没有提示恐怕就要费一番周折了。但是有了chrome这个浏览器,我们通过开发者工具就可以很好的实现调试了。

   实例代码如下:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
</head>
<body>
    <script>
        for(var i=0;i<10;i++){
            (function(){
                console.log(i+5);    
            })();
        }
    </script>
</body>
</html>
View Code

相关文章:

  • 2022-12-23
  • 2022-01-31
猜你喜欢
  • 2021-05-19
  • 2021-05-13
  • 2021-11-14
  • 2021-09-07
  • 2021-08-27
  • 2021-08-20
  • 2021-09-13
相关资源
相似解决方案