Locate B4A line from Java line #?

cutstone

Member
Licensed User
Longtime User
Is it possible to locate the B4A line from a java line number, thrown on execution error? Is there a reference list somewhere?

When users report an error, they have only the sub name and java line number. It can sometimes be hard to put a finger on the line in B4A where the error occurs. For temporary errors, it might be like a needle in haystack to recreate in a controlled debugged environment.
 

cutstone

Member
Licensed User
Longtime User
If you look in Objects/src/packagename/ folder for a .java file named after your Activity, you can open that .java file in a text editor which displays line numbers to find the offending code...

Thank you so much for this information. Very usefull, it saves me a lot of guessing.
 
Upvote 0

Kevin

Well-Known Member
Licensed User
Longtime User
Taking this a step further, every time I release a version on the market, I make a zip of the entire project folder (including the generated APK / java code). This way you can always find the correct line depending on the version as this can obviously change from one release to another. It is also handy for any reasons you may wish to review past code.
 
Upvote 0
Top