Bug? BreakPoints not Hit in Debug Mode.

Swissmade

Well-Known Member
Licensed User
Longtime User
Hi,

Strange thinks happening with the debugger.
Breakpoints not hit when I mark them.
Sometimes they will and sometimes they don't.
We talk about a breakpoint always has to hit.
When I place the breakpoint one row lower it will hit most of the time.

Any help in this thanks.
 

Swissmade

Well-Known Member
Licensed User
Longtime User
Can you post an example with the breakpoint that is not hitting?

Sorry Erel this is not possible because of a very big program and some hardware needed to.
Once I fixed the .net then it was working for a short time. But also after reinstall B4J last version this happens sometime and sometimes not.
I can not get a finger on it when it happens or when it's not happening.

I go to try to make a screenshot when it is not hidden as sone this is happening.
Sometimes I get the feeling that the row counter is wrong after new start of the program.

When the breakpoint is not hit then I place an other breakpoint some row above or below and this is not always but most of the time hit.
 
Last edited:

Swissmade

Well-Known Member
Licensed User
Longtime User
Hi Erel,
Now I have the moment that the Breakpoints are not hit.
If I change something in the code I always restart the App and not use CTR+S
It happens after I remark a row below.
Restart B4J then the Breakpoints are hit again.
I hope this helps to find what is wrong here.

B4X:
Sub btnUserPin_Action
    If PinForm.IsInitialized = False Then "Set a Breakpoint after other breakpoint is not hit. This is Hit"
        PinForm.Initialize(UserForm, modPinConvert.ConvertPinBack(txtPin.Text))
    Else
        PinForm.SetPin(modPinConvert.ConvertPinBack(txtPin.Text)) "this is not Hit has to if I go with F8"
    End If
    PinForm.ShowPinForm
    PinTimer.Enabled = True
End Sub

Private Sub PinTimer_Tick
    If PinForm.PinForm.RootPane.Visible = False Then
        PinTimer.Enabled = False
        txtPin.Text = modPinConvert.ConvertPin("", modPinConvert.NewPin)
     
'        modPinConvert.ConvertPin("", txtPin.Text) "Happents after I remark this Row"

     
        If modPinConvert.NewPin.Length = 0 Then
            btnUserPin.Text = "Pin Not Used"
        Else
            btnUserPin.Text = "Pin Used"
        End If
    End If
End Sub
Image.jpg
 

Swissmade

Well-Known Member
Licensed User
Longtime User
As I already told you can not run this project without database.
maybe we can setup a teamviewer Session.

Also I found a not stopping breakpoint.
B4X:
Private Sub GetHistoryLog()
Try
'Get Log History
tblUserLogHist.Items.Clear
        Dim RecordCount As Int
        Dim tmpRecordCount As String
        Dim SearchDay As String
        DateTime.DateFormat = "dd-MM-yyyy"
        SearchDay = DateTime.Date(DateTime.Now)
        Dim MYSQL As String "Set breakpoint here after breakpoint not hit. This is hit"
        If Main.ISMSSQL = False Then "breakpoint not Hit after chance"
            MYSQL = "SELECT COUNT(ID) FROM axlog WHERE INSTR(DateTimeLog, '" & SearchDay & "') > 0 AND TagNumber = '" & txtPinConvert.Text _ ' txtTag.Text.Trim _ "Chance this to remark" 
            & "' AND User = '" & txtName.Text.Trim & "' AND ClientName = '" &  Main.ClientName _
            & "' ORDER BY DateTimeLog;"
        Else
            MYSQL = "SELECT COUNT(ID) FROM axlog WHERE PATINDEX('%" & SearchDay & "%', DateTimeLog) > 0 AND TagNumber = '" & txtPinConvert.Text _ ' txtTag.Text.Trim _
            & "' AND [User] = '" & txtName.Text.Trim & "' AND ClientName = '" &  Main.ClientName & "';"
        End If
Image.jpg
 
Top