android-gradle-aspectj icon indicating copy to clipboard operation
android-gradle-aspectj copied to clipboard

Can't debug .aj file in Android Studio

Open cyangibm opened this issue 4 years ago • 5 comments

The plugin doesn't allow you to set debug breakpoint in .aj classes. If it does, how do you enable it?

cyangibm avatar Jun 11 '20 16:06 cyangibm

This is an IDE issue, not an issue with this plugin

jdvp avatar Jun 18 '20 17:06 jdvp

Thanks for your reply. I guess AS doesn't support .aj files, when you enable the AspectJ plugin in the Preference menu and try to open a .aj file, it freezes.

cyangibm avatar Jun 19 '20 01:06 cyangibm

Oh that's strange. I have personally had luck debugging on java aspect files in the pat. If you don't have many aspects/pointcuts it may be worth it to convert to the annotation-based aspects in java rather than .aj if debugging is necessary

jdvp avatar Jun 19 '20 01:06 jdvp

Interesting, not sure how you got it to work on your project. Would you mind sharing your Archinamon plugin app settings? I've migrated many .aj files from Eclipse project, so it's lots of rework.

cyangibm avatar Jun 21 '20 16:06 cyangibm

@cyangibm Sure, this sample project is what my setup looks like (I think Android Gradle 4.0.0, Gradle 6.1.1, android-gradle-aspectj 4.2.1)

https://github.com/jdvp/AndroidAspectExample

I am able to debug in Android Studio on the advices defined inside the AspectLogging.kt file. Hopefully that helps

jdvp avatar Jun 26 '20 00:06 jdvp