本文介绍了如何从 Chrome 中的代码设置 JavaScript 断点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想强制 Chrome 调试器在一行上通过代码中断,或者使用某种注释标签,例如 console.break().

I want to force the Chrome debugger to break on a line via code, or else using some sort of comment tag such as something like console.break().

推荐答案

您可以在代码中使用 debugger;.如果开发者控制台打开,执行将中断.它也适用于萤火虫.

You can use debugger; within your code. If the developer console is open, execution will break. It works in firebug as well.

这篇关于如何从 Chrome 中的代码设置 JavaScript 断点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

06-27 05:22
查看更多