Closed Bug 1526557 Opened 1 year ago Closed 1 year ago

Messages from log points should point to the right source/location

Categories

(DevTools :: Debugger, enhancement, P2)

67 Branch
enhancement

Tracking

(firefox67 fixed)

RESOLVED FIXED
Firefox 67
Tracking Status
firefox67 --- fixed

People

(Reporter: Harald, Assigned: bhackett1024)

References

Details

User Story

When seeing messages generated from a logpoint, I want to have the breakpoint’s source location referenced for the log, so that I can navigate to the file.

Attachments

(1 file)

Logpoints right now generate logs with 'debugger eval code'.

They should reflect the source and location of the associated breakpoint.

Assignee: nobody → bhackett1024
Attached patch patchSplinter Review

This patch sends a console message with the right source information directly from the breakpoint handling code in the server, avoiding calling console.log directly.

Attachment #9046952 - Flags: review?(lsmyth)

Oh, doing things this way also fixes a bug I noticed where creating a logpoint that throws would pause execution as if it was a normal breakpoint. Instead, the thrown exception is logged.

Comment on attachment 9046952 [details] [diff] [review]
patch

Review of attachment 9046952 [details] [diff] [review]:
-----------------------------------------------------------------

It is unfortunate that this reaches through all these private fields to call `onConsoleAPICall`, but that's something we can always try to fix in the future.
Attachment #9046952 - Flags: review?(lsmyth) → review+
Pushed by bhackett@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/67bef7d63d86
Specify correct source location in logpoint messages, r=lsmyth.

Backed out for failing xpcshell at test_framebindings-02.js

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&resultStatus=testfailed%2Cbusted%2Cexception&classifiedState=unclassified&selectedJob=230908989&revision=67bef7d63d865cd66c8f7c836ed8a0b90da8215e

Failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=230908989&repo=mozilla-inbound&lineNumber=2010

Backout: https://hg.mozilla.org/integration/mozilla-inbound/rev/d11fd5d6bda6aca0e7e5786a45471726dfdddb9a

Unfortunately, both bugs were pushed at once and I could not figure out which one is the real cause based on retriggers and revision info, reason I backed out both bugs.

Flags: needinfo?(bhackett1024)
Pushed by bhackett@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/7497f6274141
Specify correct source location in logpoint messages, r=lsmyth.
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 67
Flags: needinfo?(bhackett1024)
You need to log in before you can comment on or make changes to this bug.