mozilla :: #devtools

19 May 2017
10:49jdescottesso, I've a got a stupid JS question. Can anyone tell me why `"0" == false` and `!("0") == false` are both true statements?
10:54pbrothis is crazy
10:54pbro"0" is a string that, unlike other strings, is falsy
10:55pbro*but* it looks like converting a string to a bool (by using !) always produces false
10:55pbroI mean, true, but since you have !, false
10:56pbroI don't know, I'm confused
10:56jdescottesI'm lost too
10:56pbrobut evaluating the truthiness of "0" vs. "casting" the string "0" to a bool don't produce the same result
10:57pbrothere are probably real words to describe this :)
10:57jdescottesit's just that I was kind of relying on == false to know if something was falsy or not
10:57jdescottesbut if ("0") actually goes into the if statement
10:58pbrowould triple equal help you in this case?
11:01jdescottesoh there are plenty of ways of handling that properly, I just stumbled upon this during a review
11:01jdescottesand my mental model just shattered
11:01jdescottesnothing makes sense anymore
11:04pbrohaha, yeah
11:38gldam woke up to see my world view of JS just being shattered
11:40jdescottesgl: terrifying, going back to sleep is probably the only way to handle this properly
11:40jdescotteswhat's the point
11:42jdescottesI'm french, I should just go on strike against JS
12:22gli should've just went back to sleep and pretend this was all a dream
12:22glit's too late now
12:28Fallenhow do I disable the new debugger? There used to be a pref but recent nightly versions got me back to the new debugger
12:28hhhh1612pbro:are they there!
12:30hhhh1612well i don't know their timezone :/
12:34Fallenlooks like devtools.debugger.new-debugger-frontend is no longer taken into account
12:34Fallenthe new debugger it completely broken for me
12:38gljlast: ^
12:39rplFallen: the browser toolbox runs in another process, and currently the pref is switched on (in the browser toolbox process profile) when the browser toolbox process starts
12:39jlastHi fallen
12:39Fallenbut doesn't the toolbox process copy prefs from the main profile?
12:40rplFallen: it is switched here: http://searchfox.org/mozilla-central/rev/24c443a440104dabd9447608bd41b8766e8fc2f5/devtools/client/framework/toolbox-process-window.js#67
12:40FallenI see
12:41Fallenjlast: hi :)
12:41rplFallen: currently the only way to revert the browser toolbox to the old debugger is doing an artifact build with that above line changed to false
12:41hhhh1612Bug 1355819. how to write test for it !
12:41firebothttps://bugzil.la/1355819 ASSIGNED, hemantsingh1612@gmail.com Editing a selector doesn't work: "Protocol error (unknownError): sheet.ownerNode is null"
12:42Fallenunfortunately some of the errors I have been getting are no longer in the browser console, the latest one was "ObjectActor.prototype.grip previewer function threw an exception", the exception being NS_ERROR_ILLEGAL_VALUE in resource://devtools/server/actors/object.js :: ObjectWithURL :: line 1577
12:43Fallenone of the previous errors was something about the code not coping with dead objects (which happens often when reloading add-ons
12:43rplFallen: the reload of the addons was happening while the debugger was paused?
12:43rpls/addons/addon/
12:45FallenI don't think so. It is an sdk addon with embedded extension, I'm getting dead object errors anyway during reload of the add-on but that may be related to my code.
12:46Fallenhere is the full error for the latest case, which happened when a breakpoint was hit: https://pastebin.mozilla.org/9022164
12:50rplFallen: what happens to the new debugger ui when that exception is raised? (that error is happening in the remote debugging server, and given that switching to the new debugger ui still uses the same server piaces, I guess the old and the new ui have different behavior when this issue is happening)
12:53Fallenrpl: the UI shows halting at the breakpoint, but not everything is correct. It is mostly green color missing :D The paused on breakpoint is not green, the current line is not green. Stepping through I eventually get to these errors:
12:53Fallenhttps://pastebin.mozilla.org/9022165
12:54jlastFallen, we switched the green pause line to a blue line. Do you see that?
12:54Fallenah ok, maybe it was that that confused me, I think this was a very recent change?
12:55Fallenit is blue alright
12:55Fallenlet me do some further testing, maybe it is working better than I expected
12:55jlastOkay. That error looks legit though so thanks for sending
12:56jlastWe know we have an issue with stale object grips...
12:56ntimjlast: I think the green was nice because it matched with the paused tool icon, so it created a nice color code, I guess blue is fine as well, but maybe the paused icon could be updated ?
12:57Fallenjlast: more errors, this time trying to open the toolbox again: https://pastebin.mozilla.org/9022166
12:57Fallenthis is the dead object issue I mentioned earlier
12:58jlastntim - yep we I agree we should update the icon as well
12:59jlasttab...
12:59ntimjlast: https://usercontent.irccloud-cdn.com/file/ei5S0cC1/paused-debugger-tab.png
12:59FallenError: Custom SelectorHighlighterhighlighter cannot be created in a XUL window
13:00Fallenthis is 2017-05-14 nightly, maybe you fixed it by now though
13:00FallenI'm waiting for the addons issue to clear before I update
13:00ntimFallen: that seems related to the inspector though
13:03pbroFallen: this XUL window error is definitely related to the inspector
13:04pbrowe should silence the error in fact. It might be confusing to people, and is certainly not useful to us
13:04Fallenthat one wasn't very concerning, I just thought I'd mention since I'm getting all these other errors
13:04pbrosure
13:14Fallenthe blue doesn't differ much from the selected line color, that would be my argument against it :)
13:21jdescottesFallen: so you actually can use the old debugger with the BT if you need to
13:21FallenI'm modifying omni.ja now, is there an easier way?
13:21jdescotteswhen you start the BT, before going to the debugger tab, go to the DevTools options, add uncheck the new debugger frontend pref
13:22jdescottesthen when you open the debugger tab, it will be the old one. But you have to do that every time you start the BT :/
13:22Fallennice!
13:23Fallenthanks
13:23jdescottesnp, glad if it helps!
13:26jdescottes(and of course the catch is that it doesn't work if you start on the debugger tab, so you need to make sure to select another tab before closing the BT)
15:38jlastjdescottes: nice hack.
15:39jdescottesjlast: I excel at providing crappy temporary solutions
15:39jlastnope, that's awesome
15:48wedrjLast: Do you know what this is called? http://i.imgur.com/BJy4TNg.png I recalled someone made a Github issue about this, but I forgot what this is called.
15:48wedrAnd then you mentioned about it a while ago.
15:48jlastit's called the sources tree in the code
15:49wedrOk, looking into Github to see if someone else requested to add source tree collapsing/folding when viewing the Browser Tools from the Dev Tools.
15:52wedrjLast: Do you know how to merge the commit from https://github.com/devtools-html/debugger.html/pull/1106 to the Browser Tools?
15:53jdescotteswedr: I think you're seeing the old debugger in your Browser Toolbox
15:53jdescottesthe old debugger only shows a flat list of files
15:53wedrjdescottes: I see.
15:53wedrI wished the new dev tools can show everything from the Browser Toolbox.
15:53jdescottesthe new debugger was only recently enabled in Nightly for the Browser Toolbox (I think)
15:53tromeywho could review a patch to the event popup in the markup view?
15:53tromeyI had asked mikeratcliffe but the calendar says he's on PTO now
15:54tromeyso I thought I'd just switch the review
15:54wedrjdescottes: I'll wait for a beta update then. We can't move to nightly for now.
15:54wedrThanks.
15:54jdescotteswedr: np!
15:54wedr(Come on, beta update,... any ETAs?)
15:55jdescotteswedr: I think 55 should hit beta mid june
15:58jdescottestromey: how big is the patch ? :D
15:59tromeyjdescottes: you can try before you buy: https://reviewboard.mozilla.org/r/138868/diff/2#index_header
15:59jdescottestromey: I can take it :)
15:59tromeyI guess not too big, mostly a test case
15:59tromeyok, thanks jdescottes
16:00tromeyI'll upload it shortly
16:00wedrjdescottes: Just realized FF55 meant we don't have a lot of time. D:
16:02wedr:o
16:06jlasttromey: looking at the source map service reload issue
16:06tromeyok
16:06jlastdo you think you could make the second script a little bit more different?
16:07tromeywhich one is the second script
16:07jryansochameau: did you figure out your add-on build issues with the .xpt?
16:07jlasti think you call it reload2
16:07tromeydifferent how?
16:08jlastwe currently have an issue where breakpoints go out of sync when the lines change. like the user adds a line or removes a line somewhere
16:08tromeythe only thing that really matters for the test is that the generated location maps to a different original URL
16:08tromeythat seems like a different sort of problem
16:09clarkbwHonza: the netmonitor launchpad work is still set for 56, right?
16:09jlastokay, no problem, we can create different test scripts
16:09tromeyanyway, I have no objection to changing tests, but it has to be done carefully to ensure that the test is still testing what it was supposed to test
16:09tromeylike back out the fix and try it
16:09tromeyin this case that's pretty easy, just a one-liner
16:11jlastahh - i see.
16:13tromeythis test was extremely fiddly to get working, bleah
16:34fitzgengregtatum: any chance I could convince you to look into https://bugzilla.mozilla.org/show_bug.cgi?id=1366061#c2 ?
16:34firebotBug 1366061 NEW, nobody@mozilla.org "Save" fails in Memory snapshot tool
16:34fitzgenthat seems like a pretty embarassing bug...
16:34fitzgenand it seems like a fix *should* be fairly straightforward
17:09gregtatumfitzgen: I'll look into it this afternoon
17:42fitzgengregtatum: <3 thanks :)
18:18arshadHi everyone, My name is Arshad, I am working on Convert Xul to Html project as a gsoc candidate. I proposed for using react and redux in my proposal.. I am confident about using these technologies but I am not sure how to setup/integrate redux in lightning. Any idea how to do this?
18:20FallenMore specifically, arshad is wondering what you used for state management with react in devtools
18:21FallenI believe there was redux somewhere, but maybe someone can tell arshad about their experience in devtools
18:25arshad^, Generally when I make redux apps then I first create react view with a bit of react states and add redux later but some people do this side by side.. Although this doesn&#39;t matter much imo but I would like to hear your views about the above approaches?
18:30jlastHi arshad, we re-wrote the debugger frontend in react/redux (github.com/devtools-html/debugger.html/). You can run it as a standalone app, which might make it easier to pick up some good practices
18:30jlasthappy to answer any specific questions
18:46ntimjryans, tromey: I was wondering whether we should port bug 1353542 to devtools
18:46firebothttps://bugzil.la/1353542 FIXED, florian@queze.net Switch to async/await from Task.jsm/yield
18:46tromeyntim: yep, I filed a bug for it
18:46tromeyI can dig it up
18:47jryansseems like a fine idea to me
18:47tromeyhttps://bugzilla.mozilla.org/show_bug.cgi?id=1365607
18:47firebotBug 1365607 NEW, nobody@mozilla.org Switch devtools to async/await from Task.jsm/yield
18:47tromeythere&#39;s even a script you can use
20:01havoCDev] open forum/ invite ?
20:51ochameaujryans: still having issues, I thought I did fixed it (without knowing why). but I ended up discovering (right now) that it only fails on xpcshell
20:51ochameaujryans: the inteface works from firefox
20:52jryansochameau: oh, like an xpcshell test?
20:53ochameaujryans: looks like I &quot;just&quot; miss the &quot;firefox-appdir = browser&quot; in xpcshell.ini
20:53ochameauthat was a tricky one to spot...
20:53jryansochameau: yes, i was just about to link this to you... ;) yes, it&#39;s quite sneaky...
21:15tromeyfitzgen: I would like to hear your thoughts on bug 977463 if you have time
21:15firebothttps://bugzil.la/977463 REOPENED, nobody@mozilla.org SourceMaps generated from commonjs-everywhere not working
21:16ntimmikeratcliffe: ping
21:16tromeyntim: according to the calendar, he&#39;s on pto from today through next week
21:16fitzgentromey: seems reasonable
21:17tromeythanks
21:17ntimtromey: thanks
21:17fitzgennp
21:19gregtatumfitzgen: pinged you for review on that bug, pushed to try, but did not include a test to test the regression
21:20gregtatumfitzgen: it came from a huge eslint fix patch, so I should probably review the entire patch now to see if there are any other regressions https://bugzilla.mozilla.org/show_bug.cgi?id=1251728
21:20firebotBug 1251728 FIXED, thomas.draebing@googlemail.com Eslint cleanup of memory tool code
21:21fitzgeninteresting
20 May 2017
No messages
   
Last message: 96 days and 6 hours ago