Litho: How to set breakpoint when annotation processor generating component files?

Created on 8 May 2017  路  9Comments  路  Source: facebook/litho

Issues and Steps to Reproduce

I'm reading source code but I find it's hard to set a breakpoint or get some output of the annotation processor, so it's not easy to understand them all. Could you plz provide some advise?
Thank you ! !

question

Most helpful comment

All 9 comments

Could you explain what you're trying to do? Depending on that there may be different places to hook best into.

I'm trying to understand how the whole project work. I've read about annotation processor, javapoet and part of codes in litho-processor and litho-widget, etc. And while reading, set a breakpoint and see what really happens there might be a great help.
I was trying to attach break point in litho-processor, for example, in ComponentsProcessor or AbstractComponentsProcessor, there's generate(SpecModel specModel) method, I want to set breakpoint there to see what happens in each round of annotation processing.Also, in lithoview or some other class, I'm curious about what input it exactly takes while compile.
Thank you !

Gotcha. Perhaps @IanChilds has some advice on how to debug the processor.

Thank you passy and pavlospt , I'll try the stackoverflow first.
But it seems need some time since I'm using android studio.Maybe I should learn how to use gradle in terminal.

@barontxu this StackOverflow question has details for Gradle as well, if you scroll a bit!

@pavlospt Thank you! I read it just now and trying to apply.

I'm closing this here as the question isn't specific to Litho. Stack Overflow is probably a better place for this. :)

Of course, you're right.A lot thanks to you and pavlospt.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sockeqwe picture sockeqwe  路  5Comments

Martin-Hogge picture Martin-Hogge  路  4Comments

Drewbi picture Drewbi  路  3Comments

Junaid-Sakib picture Junaid-Sakib  路  7Comments

harliedharma picture harliedharma  路  3Comments