small medium large xlarge

Generic-user-small
09 Sep 2010, 03:54
Brad Hutchins (142 posts)

In your debugging section, will you cover the method worked on by 280 North’s, Francisco Tolmasky, as outlined here at this Blog?

http://www.alertdebugging.com/2009/04/29/building-a-better-javascript-profiler-with-webkit/ </br> </br> Video of the above can be seen here:

http://jsconf.us/2009/francisco_video.html

Starts at 22:00. Ends at 30:20 Main point starts at 25:50 I believe this is not limited to just Objective-J, but JS in general.

NOTE: This is from April 2009, the same thing may be implemented in Firebug and Chrome by now.

Avatar_mw_large_pragsmall
10 Sep 2010, 16:13
Christophe Porteneuve (63 posts)

Hey Brad,

his is a good point. I myself discovered the displayName trick back when reading Thomas Fuchs’ excellent JS Performance Rocks book ( http://javascriptrocks.com/performance/ ).

It is probably worth mentioning; I need to check what the current status of implementation across browsers is, for that. Still, using NFE’s (named function expressions) when declaring methods remains a good practice, although it would indeed become cumbersome for functions-as-blocks use-cases.

Best,

Generic-user-small
13 Sep 2010, 00:17
Brad Hutchins (142 posts)

Just a way to say “Thank you” and “Goodbye”… American slang… You’re French, correct? That would explain why you did not understand.

Avatar_mw_large_pragsmall
13 Sep 2010, 21:38
Christophe Porteneuve (63 posts)

Hey Brad,

Yes, I am French. However, I usually get most of the usual US slang… This one eluded me; even Urban Dictionary doesn’t list that use for it! :-) Thanks for the clarification, and… you’re welcome.

Generic-user-small
14 Sep 2010, 19:47
James Coulter (1 post)

Hi,

Bought the beta pdf version today and started with the Firefox/Firebug example starting on page 114. Ran into a problem setting a breakpoint for the base variable (Firebug gave a ReferenceError). Fixed it by adding a var base = 0 declaration at the top of the debugbench.js script. Works fine now.

Cheers,

Jim

Avatar_mw_large_pragsmall
16 Sep 2010, 14:31
Christophe Porteneuve (63 posts)

Hey James,

Yes, JS won’t let you use variable names you didn’t declare first (modern engines won’t, at any rate). This goes for variables you’d use in breakpoint conditions, as such conditions are eval’d in the scope of the line the breakpoint is on.

Good to hear you figured it out :-) You could have tried with pre-existing stuff, such as, er, @new Date().getMinutes() % 2 == 0@ to break only on even minutes (yeah, that’s useless except as a demo).

Best,

Generic-user-small
19 Sep 2010, 05:00
Brad Hutchins (142 posts)

Christophe,

Have you come to a conclusion about what you said before (listed bellow), and have you found out if other browsers support it as well? I would think any browser based on WebKit would support it… http://trac.webkit.org/wiki/Applications%20using%20WebKit </br> </br> “This is a good point. I myself discovered the displayName trick back when reading Thomas Fuchs’ excellent JS Performance Rocks book ( http://javascriptrocks.com/performance/ ).

It is probably worth mentioning; I need to check what the current status of implementation across browsers is, for that. Still, using NFE’s (named function expressions) when declaring methods remains a good practice, although it would indeed become cumbersome for functions-as-blocks use-cases.”</i> </br> </br> Piece…

Avatar_mw_large_pragsmall
20 Sep 2010, 18:37
Christophe Porteneuve (63 posts)

Hey Brad,

I haven’t had time yet to research this. But it’s on my agenda :-)

Avatar_mw_large_pragsmall
09 Oct 2010, 19:05
Christophe Porteneuve (63 posts)

Hello Brad,

I just wanted to let you know: after some research, the @displayName@ property for functions appears to work only in Safari.

That’s a bit narrow to warrant mention in the book. Especially when I believe we should aways use named function expressions (NFE) for important methods (those we’re likely to want to spot in a stack trace, for instance), leaving anonymity only for functions-as-blocks use cases.

Thanks for the suggestion, though! I appreciate it.

Best,

Generic-user-small
26 Nov 2010, 13:14
Clare J. Boffemmyer (2 posts)

I believe that “Piece…” … should be written “Peace”

  You must be logged in to comment