使用Chrome JavaScript调试器/如何打破页面加载事件 [英] Using Chrome JavaScript Debugger / How to break on page loading events

查看:99
本文介绍了使用Chrome JavaScript调试器/如何打破页面加载事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用chrome的调试器,当一个页面运行时我设置断点就很好。我的问题是,当我做f5或者在URL行上输入我的断点消失时。如何在页面首次加载时发生的代码中设置断点?

I'm using chrome's debugger and I'm good when it comes to setting break points once a page is running. My problem is when I do either f5 or press enter on the URL line my break points disappear. How can I set a break point in code that happens when the page first loads?

推荐答案

Safari和Firefox的较新版本应该工作正确地使用重载中的断点,但需要确保查询在请求之间完全相同。例如,ExtJS 4添加了一个 _dc =< epoch> ,将禁用缓存。

Later versions of Safari and Firefox should work properly with breakpoints across reloads, but one needs to be sure that the query is exactly the same between requests. ExtJS 4, for instance, adds a _dc=<epoch> that will disable the cache.

停止该行为,添加以下内容:

To stop that behavior, add the following:

Ext.Loader.setConfig({
    disableCaching: false,
    enabled: true
});

希望有帮助!

这篇关于使用Chrome JavaScript调试器/如何打破页面加载事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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