mobileFX WebKitX CEF3 ActiveX 4.x
WebKitXCEF3Lib ActiveX Control / WebKitXCEF3 Object / OnDebuggerBreakpointHit Event

The URL of the Script where Break has occurred.

The Script ID of the Script where Break has occurred.

The Call Frame ID where Break has occurred. You would want to keep this for use with Debugger methods of WebKitX.

The Line in the Script where Break has occurred.

The Column in the Script where Break has occurred.

An exception description if the Break occurred by error condition.

The raw JSON Debugger response as defined by Inspector Protocol.

See here: https://chromedevtools.github.io/devtools-protocol/

In This Topic
    OnDebuggerBreakpointHit Event
    In This Topic
    Description

    Fired when a Break point is hit or an exception is raised in JavaScript code of either Chromium or Node.js.

    Syntax
    Visual Basic
    Public Event OnDebuggerBreakpointHit( _
       ByVal Debugger As WEBKITX_DEBUGGER, _
       ByVal url As String, _
       ByVal ScriptID As String, _
       ByVal CallFrameID As String, _
       ByVal Line As Long, _
       ByVal Col As Long, _
       ByVal Exception As String, _
       ByVal JSON As String _
    )
    Parameters
    Debugger
    ValueDescription
    DEBUGGER_CHROMIUM

    Defines use of Chromium Debugger for WebKitX debugger commands and events.

    DEBUGGER_NODEJSDefines use of node.js Debugger for WebKitX debugger commands and events.
    url

    The URL of the Script where Break has occurred.

    ScriptID

    The Script ID of the Script where Break has occurred.

    CallFrameID

    The Call Frame ID where Break has occurred. You would want to keep this for use with Debugger methods of WebKitX.

    Line

    The Line in the Script where Break has occurred.

    Col

    The Column in the Script where Break has occurred.

    Exception

    An exception description if the Break occurred by error condition.

    JSON

    The raw JSON Debugger response as defined by Inspector Protocol.

    See here: https://chromedevtools.github.io/devtools-protocol/

    Example
    Private Sub WebKitX_OnCreate(ByVal Settings As WebKitXCEF3Lib.ISettings, CommandLineSwitches As String)
        
        On Error Resume Next
        
        With Settings
            
            .app_path = App.Path
            .accept_language_list = "es-CL,en-GB"
            .remote_debugging_port = 9999
            .persist_session_cookies = 0
            .persist_user_preferences = 0
            
            .nodejs_auto_start = False
            .nodejs_debug_port = 9998
            .nodejs_debugger_protocol = "inspector"
            .nodejs_executable = App.Path + "\etc\config\server\node.exe"
            .nodejs_modules_path = App.Path + "\etc\config\server\node_modules"
            .nodejs_command_line_arguments = " --stack-trace-limit=25 --interactive --report-compact --insecure-http-parser "
            .nodejs_terminate_on_debug_end = True
            
        End With
        
        CommandLineSwitches = CommandLineSwitches + " --no-proxy-server --disable-cache --disable-gpu-program-cache --disable-gpu-shader-disk-cache"
        CommandLineSwitches = CommandLineSwitches + " --disable-background-networking --disable-background-timer-throttling --disable-backgrounding-occluded-windows"
        CommandLineSwitches = CommandLineSwitches + " --disable-breakpad --disable-client-side-phishing-detection --disable-default-apps --disable-dev-shm-usage "
        CommandLineSwitches = CommandLineSwitches + " --disable-renderer-backgrounding --disable-sync --metrics-recording-only --no-first-run --no-default-browser-check"
        
    End Sub
    
    Private Sub WebKitX_OnDebuggerStarted(ByVal Debugger As WebKitXCEF3Lib.WEBKITX_DEBUGGER)
        
        On Error Resume Next
        
        If Debugger = DEBUGGER_CHROMIUM Then
            
            ClientDebuggerReady = True
            
        End If
        
        If Debugger = DEBUGGER_NODEJS Then
            ServerDebuggerReady = True
            LoadBreakPoints DEBUGGER_NODEJS
        End If
        
        LoadBreakPoints Debugger
        
        UpdateDebuggerStatus
        
    End Sub
    
    Private Sub WebKitX_OnLoadEnd()
        
        On Error Resume Next
        
        Caption = WebKitX.Document.Title
        PageLoaded = True
        UpdateDebuggerStatus
        
    End Sub
    
    Private Sub WebKitX_OnDebuggerTerminated(ByVal Debugger As WebKitXCEF3Lib.WEBKITX_DEBUGGER)
        
        On Error Resume Next
        
        If Debugger = DEBUGGER_CHROMIUM Then
            ClientDebuggerReady = False
            
       ElseIf Debugger = DEBUGGER_NODEJS Then
            ServerDebuggerReady = False
            
        End If
    
    End Sub
    
    Private Sub WebKitX_OnWebSocketError(ByVal Debugger As WebKitXCEF3Lib.WEBKITX_DEBUGGER, ByVal ErrorCode As Long, ByVal ErrorDescr As String)
    
        On Error Resume Next
        
        If Debugger = DEBUGGER_CHROMIUM Then
            ClientDebuggerReady = False
        
        ElseIf Debugger = DEBUGGER_NODEJS Then
            ServerDebuggerReady = False
            
        End If
    
    End Sub
    
    Private Sub WebKitX_OnDebuggerPaused(ByVal Debugger As WebKitXCEF3Lib.WEBKITX_DEBUGGER)
        
        On Error Resume Next
        
        If Debugger = DEBUGGER_CHROMIUM Then
            ClientPaused = True
        
        ElseIf Debugger = DEBUGGER_NODEJS Then
            ServerPaused = True
                
        End If
        
        UpdateDebuggerStatus
        
    End Sub
    
    Private Sub WebKitX_OnDebuggerResumed(ByVal Debugger As WebKitXCEF3Lib.WEBKITX_DEBUGGER)
        
        On Error Resume Next
        
        If Debugger = DEBUGGER_CHROMIUM Then
            ClientPaused = False
            
        ElseIf Debugger = DEBUGGER_NODEJS Then
            ServerPaused = False
            
        End If
        
        UpdateDebuggerStatus
            
    End Sub
    
    Private Sub WebKitX_OnDebuggerBreakpointHit(ByVal Debugger As WebKitXCEF3Lib.WEBKITX_DEBUGGER, _
                                                ByVal URL As String, ByVal ScriptID As String, ByVal CallFrameID As String, _
                                                ByVal Line As Long, ByVal Col As Long, ByVal Exception As String, _
                                                ByVal JSON As String)
        On Error Resume Next
        
        frm_Designer.Editor.CallByNameAsync "OnDebuggerBreakpointHit", Array(Debugger, URL, ScriptID, CallFrameID, Line, Col, Exception)
        
        UpdateDebuggerStatus
        
    End Sub
    
    Private Sub WebKitX_OnConsoleMessage(ByVal ConsoleMessage As String, ByVal Source As String, ByVal Line As Long)
        
        On Error Resume Next
        
        frm_Designer.Editor.CallByNameAsync "OnDebuggerConsoleMessage", Array(ConsoleMessage, Source, Line)
        
    End Sub
    
    Private Sub WebKitX_OnError(ByVal ErrorCode As Long, ByVal ErrorDescr As String)
        
        On Error Resume Next
        
        frm_Designer.Editor.CallByNameAsync "OnDebuggerError", Array(ErrorDescr, ErrorCode)
        
    End Sub
    See Also