09 Sep 2010, 03:54
Generic-user-small

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.

10 Sep 2010, 16:13
Avatar_mw_large_pragsmall

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,

10 Sep 2010, 19:04
Generic-user-small

Brad Hutchins (142 posts)

Piece…

12 Sep 2010, 23:16
Avatar_mw_large_pragsmall

Christophe Porteneuve (63 posts)

“Piece”?

13 Sep 2010, 00:17
Generic-user-small

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.

13 Sep 2010, 21:38
Avatar_mw_large_pragsmall

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.

14 Sep 2010, 19:47
Generic-user-small

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

16 Sep 2010, 14:31
Avatar_mw_large_pragsmall

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,

19 Sep 2010, 05:00
Generic-user-small

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…

20 Sep 2010, 18:37
Avatar_mw_large_pragsmall

Christophe Porteneuve (63 posts)

Hey Brad,

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

20 Sep 2010, 19:43
Generic-user-small

Brad Hutchins (142 posts)

Thank you

09 Oct 2010, 19:05
Avatar_mw_large_pragsmall

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,

26 Nov 2010, 13:14
Generic-user-small

Clare J. Boffemmyer (2 posts)

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

  You must be logged in to comment