Android Question Rapid Debugger problem

LucaMs

Expert
Licensed User
Longtime User
From the Erel's Rapid Debugger Tutorial (http://www.b4x.com/android/forum/threads/rapid-debugger.33120/)

"Unlike the legacy debugger, the app cannot run when the IDE is not connected. It will wait for 10 seconds for the IDE to connect and then exit."

This is exactly what i obtained: an exit :(, but... after the well completed installation!

--------- beginning of /dev/log/main
--------- beginning of /dev/log/system
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **

Usually, I connect the USB cable and hit F5. Sometimes, i use Restart ADB Server, for a new emulator "on-line". Nothing else!


Thank you for any replies


UPDATED: Erel, only you can help me, I think
 
Last edited:

klaus

Expert
Licensed User
Longtime User
That's what I thought.
I think we should try, when we have trouble, to make a small project showing the problem for Erel to improve the Rapid Debugger.
I haven't done it yet, because the projects I am currently working on are bigger ones where the Rapid Debugger is too slow.
But I'll try to do in the near future.
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
That's what I thought.
I think we should try, when we have trouble, to make a small project showing the problem for Erel to improve the Rapid Debugger.
I haven't done it yet, because the projects I am currently working on are bigger ones where the Rapid Debugger is too slow.
But I'll try to do in the near future.


For my problem, is not a matter of size of the project: even an empty project. It is normally compiled and installed but it is as if I had compiled in Release mode!
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
Can you post a small project to show Erel what happens.



Unfortunately I can not explain well in English. I try to use Google Translate, even attempting to correct.

I just ran other tests.

A simple project, with a layout that contains a button to exit the application.

Strangely, I started it twice, in rapid debug, and the second time... it worked (although I have suspended the execution, inserted a msgbox in the button event, before the ExitApplication statement and It did not appear).

Then, I also tried a more complex app and, unlike before, the green dialog is displayed, but the IDE disconnects almost immediately, without me touching the display of the device.

I also tried to disable my firewall (for both java and B4A it ask me the permission to connect, for my choice): no significant effect.

I will do other tests and I will try to give you more information to understand this strange behavior.

greetings
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
Finally I understand what's going on (I think).

In summary:

It is not well managed (by the compiler) the Try / Catch / End Try.
------------------

In detail:

The Activity_Create (Main Module) calls immediately, before loading a layout, a routine of an Activity Module. This, launches another procedure, in another Module (yes, it is twisted, I know) and this second routine tries to open a text file and, if not found, creates it.

The point is that, instead of using a FileExists, I used a try / catch. The Catch "ends" execution. I replaced it with a File.FileExists and everything works.


B4X:
  Try
    mTranMap = File.ReadMap(AppDir, gTranFileName)
  Catch
    If Not(mTranMap.IsInitialized) Then
      mTranMap.Initialize
    End If
    File.WriteMap(AppDir, gTranFileName, mTranMap)
  End Try
("Crashes")

B4X:
  If File.Exists(AppDir, gTranFileName) Then
     mTranMap = File.ReadMap(AppDir, gTranFileName)
   Else
     If Not(mTranMap.IsInitialized) Then
       mTranMap.Initialize
     End If
     File.WriteMap(AppDir, gTranFileName, mTranMap)
   End If
(Works fine)
-----------------

(I guess the color of the "generation window" changes in the event of subsequent installations of the app)


P.S. Using Debug (legacy) Catch works!!!

greetings


DAMN... i remember now only that an "empty" app did not work! But I am certain, however, about the Catch.
PS No, in that test I have done something wrong; now it works perfectly
 
Last edited:
Upvote 0
Top