Android Question Do not display log

czzgwz88888

Member
When I debug a app B4A why not display debug logs in right window?
QQ图片20220419201139.png
 

MicroDrie

Well-Known Member
Licensed User
Longtime User
The good news is that your telephone is connected to your IDE, the bad news is that:
  • Firstly your SDK version 29 is outdated, the current version is 30.
  • Secondly manifest version is outdated, if both the SDK version and the manifest versions are both updated to version 30 the targetsdkVersion error will not showed anymore.
  • Thirdly how can anyone helps you if you do not post your code with the </> tag with your code for your logging?
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
Probably because some Huawei phones have logging disabled for performance reasons. I had this on a couple of Huawei devices I had. Here is the record I made for my future reference.
If no logging on a Huawi phone then dial

*#*#2846579#*#*
On the Y7 it doesn't need Dial pressed

or on a Huawei tablet (e.g. MediaPad M3), launch the Huawei Calculator in landscape and enter
()()2846579()()
The T3 7 needs '=' pressed, the M3 Lite 8 doesn't

You will see a hidden menu.

Go to the Project Menu > Background Setting > Log setting and define the log availability (log switch) and level (log level setting).
The actual menu may differ depending on the device.

If it doesn't work straight away then restart your phone.
 
Upvote 0

Brian Dean

Well-Known Member
Licensed User
Longtime User
This sometimes happens to me. I am surprised that I have not seen it raised in the forum before.

Usually the problem is some severe and immediate error - like trying to use an uninitialised asset in Activity_Resume. The app crashes very early and there is nothing in the log page. Then, when I find and fix the bug, on the next run the missing log data appears - it was obviously produced at the right time in the device but something stopped it getting sent until the bug was cleared. There might be several log runs "stored up".

I have always assumed, without any real idea of how the B4A Bridge works, that the crash broke the bridge before it had time to transfer the log data.
 
Upvote 0
Top