Bug? 9.50 : Breakpoint in 'IF..THEN' lines does not stop

prolab

New Member
Licensed User
Hi Erel, my first post, so forgive me in advance for errors.

IDE does not stops on IF clause. Am I missing something ?
In the example, IDE does not stops while reaching the line

> If Starter.enabled <> 0 Then

but stops when reaching both the following two breakpoints.
Thank you.
 

Attachments

Filippo

Expert
Licensed User
Please do not address your question to individual persons.
your variable is of type boolean, but you will compare with a number.
 

Erel

Administrator
Staff member
Licensed User
Are you able to reproduce it in a small project?

It breaks properly in this code:
B4X:
Sub Activity_Create(FirstTime As Boolean)
   If 2 = 3 Then '<--- breakpoint here
       Log("a")
   End If
End Sub
 

prolab

New Member
Licensed User
Are you able to reproduce it in a small project?

It breaks properly in this code:
B4X:
Sub Activity_Create(FirstTime As Boolean)
   If 2 = 3 Then '<--- breakpoint here
       Log("a")
   End If
End Sub
A little investigating...
It seems to be caused from a preceding call of a resumablesub within a if clause.

Not so small project but it shows the issue

Taken B4A_B4Xdrawer from here
https://www.b4x.com/android/forum/threads/b4x-b4xdrawer-sliding-drawer.97828/#content

And done small mods in Main.

(sorry, I don't know how to upload the modded project, upload a file says it is too big).


B4X:
Sub Activity_Create(FirstTime As Boolean)
    Drawer.Initialize(Me, "Drawer", Activity, 300dip)
    Drawer.CenterPanel.LoadLayout("1")
    ToolbarHelper.Initialize
    ToolbarHelper.ShowUpIndicator = True 'set to true to show the up arrow
    Dim bd As BitmapDrawable
    bd.Initialize(LoadBitmap(File.DirAssets, "hamburger.png"))
    ToolbarHelper.UpIndicatorDrawable =  bd
    ACToolBarLight1.InitMenuListener
    Drawer.LeftPanel.LoadLayout("Left")

    ' >>>>>>>>> START OF MODS <<<<<<<<<<<<<
    If "pippo" <> "" Then
        Wait For (testRSub) Complete (gotServer As Boolean)   '<<- this call seems to cause the problem
    End If
    
    If 1 <> 0 Then    '<<- breakpoint here FAILS
       ListView1.AddSingleLine("Item ZeroZero" )     '<<- breakpoint here works
    End If
    ' >>>>>>>>> END OF MODS <<<<<<<<<<<<<<<<<<
 
    For i = 1 To 30
        ListView1.AddSingleLine("Item " & i)
    Next
End Sub

' >>>  dummy resumable sub <<<
Sub testRSub() As ResumableSub
    Dim retval  As Boolean = False
 
    Return retval
End Sub
 
Last edited:
Top