问题
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