Closed Bug 1400197 Opened 7 years ago Closed 7 years ago

js debugger broken on BSD

Categories

(DevTools :: Debugger, defect)

Unspecified
OpenBSD
defect
Not set
normal

Tracking

(firefox55 ?, firefox56 affected, firefox57 affected)

RESOLVED FIXED
Tracking Status
firefox55 --- ?
firefox56 --- affected
firefox57 --- affected

People

(Reporter: gaston, Unassigned)

Details

Opening the debugger in devtools on OpenBSD triggers lots of vomit: console.error: Message: TypeError: KEYS[os] is undefined Stack: getKeyForOS@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/debugger/new/debugger.js:29495:4 getKey@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/debugger/new/debugger.js:29491:11 Of course, no match for Tier3 platforms in this... : var KEYS = { WINNT: { resume: "F8", pause: "F8", stepOver: "F10", stepIn: "F11", stepOut: "Shift+F11" }, Darwin: { resume: "Cmd+\\", pause: "Cmd+\\", stepOver: "Cmd+'", stepIn: "Cmd+;", stepOut: "Cmd+Shift+:", stepOutDisplay: "Cmd+Shift+;" }, Linux: { resume: "F8", pause: "F8", stepOver: "F10", stepIn: "Ctrl+F11", stepOut: "Ctrl+Shift+F11" } }; Please, think of the kittens and take into account the BSDs or other non-Tier1 platforms (solaris ?)
And this is since https://github.com/devtools-html/debugger.html/commit/d928662df130176ba02a3e1bcc94fdfe3aaf02cf - jason, which is the better way to fix this horror ?
Flags: needinfo?(jlaster)
I'm sorry :gaston, I'll put a fix together today here: https://github.com/devtools-html/debugger.html/issues/4088 Is it okay to fall back on Linux shortcuts if the OS does not match?
Flags: needinfo?(jlaster)
Nobody asked me but yes, I would definitely expect to get Linux shortcuts on the BSDs. And I suppose that's the most likely OS family when Firefox isn't running on one of the big three?
Yes, in lots of cases you can fallback to 'linux' defaults.
Fwiw, i tried hotpatching devtools/client/debugger/new/debugger.js in ffx 56.0rc1 source tarball - Linux: { + OpenBSD: { but after a rebuild my patch/fix wasnt applied, i was still getting the same error, so i dunno what value appinfo.OS has on OpenBSD, and im not even sure *which* file ends up being used at runtime... even if i know its a bit late, would be good to fix that in 56.
Using this temporary workaround: function getKeyForOS(os, action) { - return KEYS[os][action]; + return KEYS["Linux"][action]; } The debugger window in devtools seems to be working again. I don't know how you want to properly fix it though... maybe if (typeof KEYS[os] === 'undefined') { return KEYS["Linux"][action]; } return KEYS[os][action]; instead of listing all possible unix-like operating systems (bsds, solaris, etc..)
Yes, that would also work for us.
This is now fixed on nightly.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
What's needed to get this uplifted to beta/57, since there's no link to a m-c commit ? Just requiring approval-beta?
was/would be a candidate to be?
Qk, so it was commited to m-c on https://hg.mozilla.org/mozilla-central/rev/a001ffb41787#l1.209 - but not yet reverted ?
The tracking flags are still wrong, and given the github<->m-c mess, i cant figure out if it was actually commited and it sticked into the tree, and in which branch... jason ?
Flags: needinfo?(jlaster)
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.