最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - How to turn on Pause On Uncaught Exceptions in Google Chrome Canary? - Stack Overflow

programmeradmin0浏览0评论

In this article it talks about turning on pausing on uncaught exceptions.

I can only see Pause On Caught Exceptions in both Chrome and Canary. I'm using Chrome Canary Version 43.0.2344.2 canary (64-bit).

I'm getting a Uncaught SyntaxError: Unexpected token :, sourcing to a location (e.g. VM272) and it's very difficult to track down without a trace of the call stack.

I've searched and found that I can add

> window.onerror = function() { debugger;}

In the console, but that doesn't get me a stack trace. The Scope window does provide a lot of variable info, but I'm still a bit lost.

In this article it talks about turning on pausing on uncaught exceptions. https://developer.chrome./devtools/docs/javascript-debugging

I can only see Pause On Caught Exceptions in both Chrome and Canary. I'm using Chrome Canary Version 43.0.2344.2 canary (64-bit).

I'm getting a Uncaught SyntaxError: Unexpected token :, sourcing to a location (e.g. VM272) and it's very difficult to track down without a trace of the call stack.

I've searched and found that I can add

> window.onerror = function() { debugger;}

In the console, but that doesn't get me a stack trace. The Scope window does provide a lot of variable info, but I'm still a bit lost.

Share Improve this question asked Mar 25, 2015 at 18:17 dfdumaresqdfdumaresq 1,6374 gold badges17 silver badges22 bronze badges 1
  • related stackoverflow./questions/2233339/… – Ciro Santilli OurBigBook. Commented Oct 5, 2016 at 12:34
Add a ment  | 

1 Answer 1

Reset to default 3

The docuemntation is a little bit outdated.

In the new Chrome versions the "pause on exception" button doesn't toggle anymore between 3 states (disabled, "Pause on Exceptions","Pause on Uncaught Exceptions") but only between two states (disabled and "Pause on Exception").

In order to be able to also break on caught exceptions they introduced this checkbox (this is useful if you have a global exception handler in GWT but still want to break when the exception is thrown).

So if you don't catch the exception then the settings you have shown in your screenshot should work.

发布评论

评论列表(0)

  1. 暂无评论