调试器不会在断点处停止(chrome) [英] debugger doesn't stop at breakpoint(chrome)

查看:357
本文介绍了调试器不会在断点处停止(chrome)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到的问题是,每次执行某个功能时,JS的Chrome调试器都不会停止。我尝试了调试器;并在我希望代码停止的地方设置断点,方法是在左侧行旁的排水沟上放置一个蓝色标记。

I have the problem that the chrome debugger for JS doesn't stop every time I execute one certain function. I tried debugger; and also setting breakpoints where I want the code to stop by putting a blue tag on the gutter next to the line on the left.

为什么会这样? p>

any ideas why this happens?

推荐答案

没有明确的复制计划,很难说出断点为何未达到目标。

Without a clear reproduction plan, it is very hard to tell why your breakpoints are not hitting.

但是,最可靠的在线停止方式是:

But, one surest way of stopping on a line is writing:

debugger;

到您要停止的位置。

注意:请确保清除所有 debugger ; 完成后。

NOTE: Be sure to clear all the debugger; when you are done with it.

更多信息在这里

More info is here

这篇关于调试器不会在断点处停止(chrome)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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