Open Bug 1050165 Opened 10 years ago Updated 2 years ago

Pausing on exceptions should not pause on failed QI calls

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: Fallen, Unassigned)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [chrome-debug])

When debugging chrome code and turning on "Pause on Exceptions", it hits a breakpoint every time a QueryInterface call throws an NS_NOINTERFACE exception. While this is of course correct because its an exception too, its highly annoying and makes the feature unusable for debugging chrome code. Can we ignore the exception if its inside a QueryInterface function, or if its NS_NOINTERFACE?
Summary: Pause on Exceptions also pause on QueryInterface calls → Pause on Exceptions also pauses on QueryInterface calls
Does "ignore caught exceptions" and/or black boxing unrelated code not handle this use case for you? Personally, I don't like the idea of special casing when features shouldn't behave as they're described...
That *is* an unhandled exception only. It happens for me too, every time. I have to (one by one) blackbox all those files. They are mostly irrelevant wrt js hacking.
You can use the gcli command to blackbox many at once
We are talking about browser toolbox here. Also, I dont know all the file names from where such exceptions will come.
Can I blackbox only full files or also just code lines? If you are debugging xpcom components, you don't want to blackbox the whole file, just the QI call.
If even the devs who actually work with those files dont want to break on QI calls, then by popular demand, I think we should consider handling these exceptionally. Since this is Firefox/Gecko code which only devs working on gecko application will debug using browser toolbox. Regarding black boxing code lines - No
Just to be clear, I'm not saying there are no use cases for breaking on QI. In certain cases you would want to figure out what interfaces might be missing for a component. But to do so, I think it would be more common to explicitly set a breakpoint instead of relying on "Pause on Exceptions". As a result, I think that pause on exceptions should not pause on NS_NOINTERFACE, but breakpoints in QI should still be taken into account.
I agree with that too.
Agreed, this is very annoying. I'm certainly not happy with adding special-case code, but this comes up so often in browser debugging that I believe an option to disable these pauses ("Ignore NS_NOINTERFACE errors from QueryInterface"?) would be a big improvement. We could also only display this option in chrome toolboxes.
OS: Mac OS X → All
Priority: -- → P3
Hardware: x86 → All
Whiteboard: [chrome-debug]
Now that Bug 1060464 is copying over the user profile for Browser Toolbox, this has become quite an issue for me (and I'm guessing others) as it pauses the browser multiple times on startup. Previously, I had just set pause on exceptions to false in the Browser Toolbox profile but that doesn't work anymore after reopening. For now I've set the normal toolbox to not pause on exceptions but it would be great to not to have to do that workaround, which is hard to discover.
Summary: Pause on Exceptions also pauses on QueryInterface calls → Pausing on exceptions should not pause on failed QI calls
Product: Firefox → DevTools
Blocks: dbg-chrome

Would conditional pause on exceptions help? i.e. bug 836298

Also, is this still a common issue?

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.