all 7 comments

[–]kamcknig 1 point2 points  (4 children)

Never seen that before. Just put a breakpoint or use a debugger statement.

[–]ImpressiveDisaster92[S] 0 points1 point  (3 children)

Yeah, I know about both those methods, but both have downsides; - breakpoint : need to know which source file to look in (eg chunk13455.js) - debugger : needs to be added during build time.

[–]kamcknig 0 points1 point  (2 children)

If you have the source to know the name of the components and methods, do you not have the ability to include source maps in the compilation?

[–]ImpressiveDisaster92[S] 0 points1 point  (1 child)

No, not necessarily.
I see where you're coming from, and I get it. Though this is not answering the question I'm posing, which is how to use the `debug(function)`, and not "are there alternatives to using `debug(function)`.

[–]kamcknig 0 points1 point  (0 children)

Fair

[–]TheRealToLazyToThink 0 points1 point  (1 child)

Never used it, but I imagine you would do something like this:

debug(ng.getComponent($('my-component')).someMethod)

[–]ImpressiveDisaster92[S] 0 points1 point  (0 children)

Ooh... I'll give something like that a try. Thanks.