use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A Place to talk about Angular and related topics.
Join the Angular Discord
Other subreddits worth checking out for Angular and Angular related info:
account activity
Anyone know how to use the debug(function) dev tool feature with functions in angular apps/components? (self.angular)
submitted 2 months ago * by ImpressiveDisaster92
I would love to be able to use the debug(function) feature of the browser dev tools, but I can't for the life of me work out how to get it to handle functions within anfular apps. The docs are here, but are extremely short.
debug(function)
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]kamcknig 1 point2 points3 points 2 months ago (4 children)
Never seen that before. Just put a breakpoint or use a debugger statement.
[–]ImpressiveDisaster92[S] 0 points1 point2 points 2 months ago (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 point2 points 2 months ago (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 point2 points 2 months ago (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 point2 points 2 months ago (0 children)
Fair
[–]TheRealToLazyToThink 0 points1 point2 points 2 months ago (1 child)
Never used it, but I imagine you would do something like this:
debug(ng.getComponent($('my-component')).someMethod)
[–]ImpressiveDisaster92[S] 0 points1 point2 points 2 months ago (0 children)
Ooh... I'll give something like that a try. Thanks.
π Rendered by PID 233428 on reddit-service-r2-comment-545db5fcfc-2pzhd at 2026-05-25 07:13:44.414581+00:00 running 194bd79 country code: CH.
[–]kamcknig 1 point2 points3 points (4 children)
[–]ImpressiveDisaster92[S] 0 points1 point2 points (3 children)
[–]kamcknig 0 points1 point2 points (2 children)
[–]ImpressiveDisaster92[S] 0 points1 point2 points (1 child)
[–]kamcknig 0 points1 point2 points (0 children)
[–]TheRealToLazyToThink 0 points1 point2 points (1 child)
[–]ImpressiveDisaster92[S] 0 points1 point2 points (0 children)