Closed Bug 1809119 Opened 1 year ago Closed 1 year ago

Autocompletion in Browser Console does not seem to pick the right target

Categories

(DevTools :: Console, defect)

defect

Tracking

(firefox110 fixed)

RESOLVED FIXED
110 Branch
Tracking Status
firefox110 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

Details

Attachments

(1 file)

Steps to reproduce

  1. Open the Browser Console
  2. in the context selector, select a Content Process target (one prefixed with (pid XXX))
  3. evaluate globalThis.myProp = "hello"
  4. Type globalThis.my

Expected results

The completion text shows globalThis.myProp

Actual results

The completion text does not show globalThis.myProp


This is not that the property is not set, because evaluating globalThis.myProp does return "hello" (and I spotted this earlier because I was able to autocomplete console. although console is undefined in this context)

I missed this when I added the context selector in the Browser Console (Bug 1780156)

https://searchfox.org/mozilla-central/rev/d62c4c4d5547064487006a1506287da394b64724/devtools/client/webconsole/actions/autocomplete.js#246-250

// Note that getSelectedTargetFront will return null if we default to the top level target.
// For now, in the browser console (without a toolbox), we don't support the context selector.
const contextSelectorTargetFront = hud.toolbox
  ? hud.toolbox.getSelectedTargetFront()
  : null;
Summary: Autocompletion on Content Process does not seem to pick the right target → Autocompletion in Browser Console does not seem to pick the right target
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Pushed by nchevobbe@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ba1f5fb251fd
[devtools] Use selected target in context selector for Browser Console autocomplete. r=ochameau.
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: