1. 写一个HTML文件。例如:

 1 <!DOCTYPE html>
 2 <html>
 3 <title>Web Page Design</title>
 4 <head>
 5 <br />
 6 <script src="test.js">
 7 </script>
 8 </head>
 9 <body>
10 </body>
11 </html>

 

2. 然后在该html文件的目录下写test.js文件

3. 在Chrome中,视图->开发者->开发者工具

4. 通过 文件->打开文件,打开HTML文件,就可以对test.js进行debug。

 


 

Reference

1. Debugging JavaScript

https://developer.chrome.com/devtools/docs/javascript-debugging 

2. Debugging JavaScript using Breakpoints with the Google Chrome Developer Tools 

https://www.youtube.com/watch?v=htZAU7FM7GI

3. Debugging JavaScript - 0 to Heisenberg  (ToRead)

https://www.youtube.com/watch?v=-q1z8BPFItw

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-25
  • 2021-06-07
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-07-21
  • 2021-05-05
  • 2021-07-06
  • 2021-10-13
  • 2021-05-20
相关资源
相似解决方案