Android Question Debug not woking

shb777

Active Member
Licensed User
Longtime User
When I try to debug my program, I set a breakpoint at the beginning of activitycreate, and compile
in debug mode. After it finishes compiling, it says " waiting for ide debugger to connect" for a few seconds, and then minimizes the program. The debug windows are visible for about one second, as well
as the step, step over, controls. then they go away.
I read this in another thread:

In order for the debugger to work the INTERNET permission must be added to the manifest. This usually happens automatically. In your case you should add it manually for debugging to work.

But I have no idea how to do this. Steve
 

KMatle

Expert
Licensed User
Longtime User
I only see the internet permission when my app really needs to access the internet and I never had such an issue. Can you uninstall the app and try again? Please take care that the package name is different to other apps you have on your phone (not all with b4a.example or similar). If you use Wifi, please check your router and of course your firewall settings. Does B4A and the bridge show "connected"? Did you try to debug via usb cable?
 
Upvote 0

shb777

Active Member
Licensed User
Longtime User
I only see the internet permission when my app really needs to access the internet and I never had such an issue. Can you uninstall the app and try again? Please take care that the package name is different to other apps you have on your phone (not all with b4a.example or similar). If you use Wifi, please check your router and of course your firewall settings. Does B4A and the bridge show "connected"? Did you try to debug via usb cable?
I'm using usb cable.
 
Upvote 0

shb777

Active Member
Licensed User
Longtime User
You don't need to add any permission.

Are there any errors in the logs (including the unfiltered logs)?

I created a very simple program with only two lines, and debug works like it should.

i=5

j=i

My program has around 100 warnings in the log, but no errors.
 
Upvote 0

shb777

Active Member
Licensed User
Longtime User
I found the problem! I had this:

Dim sf As StringFunctions
sf.Initialize

in Process_Globals

when I moved sf.Initialize to activity_create, it's debugging OK
 
Upvote 0
Top