No error message when I break on an uncaught exception

RESOLVED INVALID

Status

P2
normal
RESOLVED INVALID
5 years ago
6 months ago

People

(Reporter: canuckistani, Assigned: fitzgen)

Tracking

26 Branch
x86
Mac OS X

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

To repro:

$(function() {
  var editor = new Codemirror(); // Codemirror must be undefined
});

If 'break on uncaught exceptions' is enabled, the debugger will break on the second line:

* the error object has no error message
* the web console does not yet show the error message

Hitting 'Continue' will then allow the error message to appear in the web console.

Note: jQuery is used here, and there was no difference whether jQuery was black-boxed or not.
Created attachment 823584 [details]
Codemirror_Hacking_and_index.html_—_web_editor-features_—_editor-features.png

Screenshot of what I'm seeing.
I haven't done full STR, but I get the error message when enabling pause on exceptions and then just typing

  new SomeUndefinedThing()

in the console.

Very interesting. Will look into this soon.
Assignee: nobody → nfitzgerald
Priority: -- → P2
Also, it is expected that the web console doesn't have the error yet, because we caught it before it has unwound all the way.
Mystery solved - I had selected the option 'Show only enumerable properties', by de-selecting that the message property appears. I had selected that option because I didn't want to see __proto__ et al in the Object Inspector.

We could close this bug, or we could debate the merits of overriding that preference for this particular case. Up to y'all.

Aside: in some future state where I have access to a console view in the debugger, it would be great if exceptions were logged as they happen in that UI.
(In reply to Jeff Griffiths (:canuckistani) from comment #4)
> Mystery solved - I had selected the option 'Show only enumerable
> properties', by de-selecting that the message property appears. I had
> selected that option because I didn't want to see __proto__ et al in the
> Object Inspector.
> 
> We could close this bug, or we could debate the merits of overriding that
> preference for this particular case. Up to y'all.

No, we shouldn't be lying to users.

> Aside: in some future state where I have access to a console view in the
> debugger, it would be great if exceptions were logged as they happen in that
> UI.

We also want to be able to continue, but return from the frame with some value you provide instead of bubbling the error to the global frame. We wouldn't want to log the error if you chose to return a value from that frame.

/me shrugs
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → INVALID
I do think it makes sense to have a displayString for errors which has the message though.

Updated

6 months ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.