Chrome不会调试大型JS文件 [英] Chrome won't debug a large JS file

查看:190
本文介绍了Chrome不会调试大型JS文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个大的Javascript文件(20,000行).

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

Chrome调试器无法对其进行调试. IE.我可以输入一个断点,它知道断点,但不会在其上暂停.这绝对与大文件有关.它可以处理同一站点上的较小文件.

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).

推荐答案

使用以下替代方法:

  • 复制脚本

  • Copy the script

添加调试器语句

粘贴到控制台中

运行脚本

参考

  • 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

这篇关于Chrome不会调试大型JS文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆