Java Question What debugging techniques do you use?

Lee Gillie CCP

Active Member
Licensed User
Curious how others are debugging the Java libraries created for B4A?

Since I'm writing Java in Eclipse running on Windows PC it seems natural to want to try to create a java test framework to allow debugging in Eclipse. But right away I get tripped up with no BA to initialize my class with. I use BA to raise events back to B4A caller. Of course Eclipse actually executes debug target on a PC, not Android.

I can test by compiling and debugging an actual B4A project which calls my library on the Android tablet. But I can not set breakpoints down in the Java library code, and check values, and such. I can only debug the B4A part.

.NET is my forte, and I write a lot of Windows Services. Even there I have found tricks which allow me to debug a running service in the .NET debugger.

But for Java library development, I am currently using logging extensively, but striving for ways to shorten the test cycle, and more effective tools or approaches which allow me to explore values of complex structures while at breakpoints, which for me is a terrific way to learn something new.

Thank you for sharing.
 

Erel

Administrator
Staff member
Licensed User
The debugger allows you to see the library classes instance variables. It can be useful in some cases.

Other than that I'm using BA.Log.
 
Top