Debugging Business Logic in an External Debugger

Debugging Business Logic in an External Debugger

You can debug Business Logic using any external debugger supporting the V8 debugger protocol, including the Google Chrome and Opera web browsers.

Starting a Debug Session

To start a debugging session, you need to execute the following request:

$.ajax({
    url: 'https://api.everlive.com/v1/Metadata/Applications/your-app-id/Debug/Start',
    type: "GET",
    headers: {
        "Authorization": "Masterkey your-master-key"
    },
    success: function (data) {
        alert(JSON.stringify(data));
    },
    error: function (error) {
        alert(JSON.stringify(error));
    }
});

If the session is started successfully, the server will return the following object:

{
    "Result": {
        "SessionKey": "your-session-key-here",
        "Url": "http://debug.everlive.com/v1/Metadata/Applications/your-app-id/Debug/UI/session-key-here/",
        "DebugProtocolUri":"ws://debug.everlive.com/v1/Metadata/Applications/your-app-id/Debug/UI/session-key-here/ws",
        "Exists": false
    }
}

The Exists key will equal false if the debug session was freshly created and will equal true if there was already an existing session for the application.

The Url key holds the value for the debug session Url. You can open a debug window by copying the value and navigating to it in a Chrome or Opera browser.

Stopping a Debug Session

To stop a debugging session, you need to execute the following request:

$.ajax({
    url: 'https://api.everlive.com/v1/Metadata/Applications/your-app-id/Debug/Stop',
    type: "GET",
    headers: {
        "Authorization": "Masterkey your-master-key"
    },
    success: function (data) {
        alert(JSON.stringify(data));
    },
    error: function (error) {
        alert(JSON.stringify(error));
    }
});

If the session is stopped successfully, the server will return the following object:

{
    "Result": true
}

Restarting a Debug Session

To restart a debugging session, you need to execute the following request:

$.ajax({
    url: 'https://api.everlive.com/v1/Metadata/Applications/your-app-id/Debug/Restart',
    type: "GET",
    headers: {
        "Authorization": "Masterkey your-master-key"
    },
    success: function (data) {
        alert(JSON.stringify(data));
    },
    error: function (error) {
        alert(JSON.stringify(error));
    }
});

If the session is restarted successfully, the server will return the following object:

{
    "Result": true
}

Getting Current Debug Session Status

To get the status of the current debugging session, you need to execute the following request:

$.ajax({
    url: 'https://api.everlive.com/v1/Metadata/Applications/your-app-id/Debug/Status',
    type: "GET",
    headers: {
        "Authorization": "Masterkey your-master-key"
    },
    success: function (data) {
        alert(JSON.stringify(data));
    },
    error: function (error) {
        alert(JSON.stringify(error));
    }
});

If there is an active debugging session, the server will return the following object:

{
    "Result": {
        "SessionKey": "your-session-key-here",
        "Url": "http://debug.everlive.com/v1/your-app-id/system.debug/ui/session-key-here/",
    }
}

If there is no active debugging session, the server will return the following object:

{
    "message": "No debug session found.",
    "errorCode": 801
}
Start a free trial Request a demo
Contact us: +1-888-365-2779
sales@telerik.com
Copyright © 2016-2017, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.