Open Bug 1658479 Opened 5 years ago Updated 4 years ago

Debugger panel isn't optional

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: jdm, Unassigned)

Details

Servo implements a devtools server and relies on Firefox's remote developer tools client. We only support the JS console right now, so the presence of a non-functional Debugger panel is confusing for web developers. Since Servo is shipping as part of Firefox Reality for HoloLens 2 devices, it would be helpful if Tools.jsdebugger.isTargetSupported did not unconditionally return true, but could check for a trait or something.

https://searchfox.org/mozilla-central/rev/ab81b8552f4aa9696a2524f97fdfeb59d4dc31c1/devtools/client/definitions.js#220-222

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: General → Debugger

Julian, is this easy to fix?
Honza

Severity: -- → S3
Flags: needinfo?(jdescottes)
Priority: -- → P3

We can check for a trait. I think I would prefer a trait that hides the debugger rather than the opposite, to avoid having to modify all DevTools targets with this new trait.

Eg check something like:

  isTargetSupported: function(target) {
    // This trait is never set for regular DevTools Server targets. 
    // Only used by Servo's implementation of DevTools Server.
    return !target.traits.debuggerNotSupported;
  },

Then it would be up to Servo's implementation of the Target to setup traits correctly.
I quickly tried disabling the debugger and DevTools seemed to work. But since this is a default panel, there is a risk other UI bits in other panels have been relying on it. For instance, script links in the console will be broken etc... (everything using viewSourceInDebugger basically, although it should only be triggered on user actions and should hopefully not lead to blank UIs etc...)

Flags: needinfo?(jdescottes)
You need to log in before you can comment on or make changes to this bug.