Chrome won't debug a large JS file

冷暖自知 提交于 2019-12-06 03:05:36

问题


I have a large Javascript file (20,000 lines).

The Chrome debugger won't debug it. I.e. I can put in a break point and it knows about the break point but it won't pause on it. This is definitely to do with the large file size; it work with smaller files on the same site.

Does anyone have any ideas how I can get it to work with this large file? (I'm unable to do anything about the large file size).


回答1:


Use the following alternative:

  • Copy the script

  • Add a debugger statement

  • Paste into the console

  • Run the script

References

  • DevTools: [console] feature: force enable strict-mode for console evaluations
  • Console: Handle object literals
  • ES6 template literal support in DevTools
  • Chromium Design Documents: Site Isolation


来源:https://stackoverflow.com/questions/20284223/chrome-wont-debug-a-large-js-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!