Closed
Bug 881672
Opened 11 years ago
Closed 11 years ago
Enabling a DUMP function for all Gaia apps
Categories
(Firefox OS Graveyard :: Gaia, defect)
Tracking
(blocking-b2g:leo+, b2g18 fixed, b2g-v1.1hd fixed)
RESOLVED
FIXED
blocking-b2g | leo+ |
People
(Reporter: frsela, Assigned: frsela)
References
Details
Attachments
(1 file)
We should have a generic way to enable/disable DEBUG traces in Gaia.
The approach can be enabling a DUMP function for all Gaia apps
:
• one pref to rule them all (e.g. `debug.gaia.enabled') — we could even make it true by default on non-production builds;
• one shared library (`shared/js/debug/js') to expose a DUMP object that we’d use like a `console.log()' or a `dump()';
• replace all current `console.log()' calls in Gaia by a DUMP() call.
In order to make this debug data easier to grep, this DUMP() function would automatically prepend the application name (e.g. relying on document.location) in the console.log message.
Assignee | ||
Comment 1•11 years ago
|
||
This bug comes from the discussion in bug 875679 and the attachment https://bugzilla.mozilla.org/attachment.cgi?id=759685.
Related comments: #5, #6, #7 and #9
Assignee: nobody → frsela
blocking-b2g: --- → leo?
Comment 2•11 years ago
|
||
Quite a few STK-related issues are blocking (leo+) and are difficult to reproduce on development builds; to fix these blockers, our testers need a way to enable DEBUG traces without having to flash their device.
Of course, this patch would help debugging all Gaia apps — not only the STK features; but as it’d help debugging open leo+ issues, I tend to think we should address this bug ASAP, leo+ or not.
Comment 3•11 years ago
|
||
One thing I would like to see here is an approach that QA can take full advantage of during daily testing. The global preference is definitely a good idea to consider.
Assignee | ||
Comment 4•11 years ago
|
||
Examples in system and settings here:
System: https://github.com/frsela/gaia/compare/STK;Bug881672_SystemApp
Settings: https://github.com/frsela/gaia/compare/STK;Bug881672_SettingsApp
Kaze, I suppose each app should be modified in a different patch but ¿one independent bug per app? or we can collect all patches here?
Attachment #761327 -
Flags: review?(kaze)
Flags: needinfo?(kaze)
Comment 5•11 years ago
|
||
I think it’s safer to open one patch per app and make them depend on this bug. Obviously we want the Settings and System patches first.
Flags: needinfo?(kaze)
Comment 6•11 years ago
|
||
Comment on attachment 761327 [details]
Adding shared Gaia debug class
I’m not sure this is the best approach. Let’s discuss that on your pull request.
Comment 7•11 years ago
|
||
Comment on attachment 761327 [details]
Adding shared Gaia debug class
Clearing the review flag, please r? me again when ready.
Attachment #761327 -
Flags: review?(kaze)
Comment 8•11 years ago
|
||
Is this enabled for 3rd party apps too? Could a 3rd party app dumpflood the phone?
Comment 9•11 years ago
|
||
No, unless the 3rd-party app includes the shared debug.js lib and has settings privileges.
However, as long as console.log() is enabled, console flooding is possible (and easy).
Maybe we need a way to disable console.[log|warn|error] calls, but that’s outside of the scope of this patch.
Assignee | ||
Updated•11 years ago
|
Attachment #761327 -
Flags: review?(kaze)
Comment 10•11 years ago
|
||
Let's patch our local builds, but not take any extra risk for 1.1 at this point.
blocking-b2g: leo? → -
Comment 11•11 years ago
|
||
Comment on attachment 761327 [details]
Adding shared Gaia debug class
r=me, please squash your commits before merging.
Attachment #761327 -
Flags: review?(kaze) → review+
Assignee | ||
Comment 12•11 years ago
|
||
Landed: 5d6fbaa19afc6e15aa8449d6ba5e4a3cb680b0ec
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Comment 13•11 years ago
|
||
(In reply to Alex Keybl [:akeybl] from comment #10)
> Let's patch our local builds, but not take any extra risk for 1.1 at this
> point.
The problem is, patching local builds didn’t work so far. That’s why Fernando proposed a way to enable these traces directly from Gaia, and I agree it’s necessary to have these before refactoring the whole STK/ICC code base — which is a leo+ task.
This library doesn’t add any risk because it’s not used by any other Gaia app at the moment. I would like to uplift it to v1-train in order to enable STK/ICC testing.
Comment 14•11 years ago
|
||
So we re-nominate this bug to leo, as mentioned, it is important to quickly uplift it to v1-train in order to test STK/ICC patches
blocking-b2g: - → leo?
Updated•11 years ago
|
blocking-b2g: leo? → leo+
Comment 15•11 years ago
|
||
Uplifted 5d6fbaa19afc6e15aa8449d6ba5e4a3cb680b0ec to:
v1-train: 74684bda85753fcedcceb128ef1dca9ff3071f54
status-b2g18:
--- → fixed
Comment 16•11 years ago
|
||
1.1hd: 74684bda85753fcedcceb128ef1dca9ff3071f54
status-b2g-v1.1hd:
--- → fixed
Updated•11 years ago
|
Flags: in-moztrap-
You need to log in
before you can comment on or make changes to this bug.
Description
•