Back

SetOnDebug

Hello World

Define a callback function for debug messages.

app.SetOnDebug( callback )

See also: Debug, SetDebug

Example - OnDebug

function OnStart()
{
    app.SetOnDebug( OnDebug );
    app.Debug( "app started" );
}

function OnDebug(msg)
{
    app.SetDebug();
    app.Alert( msg, "Received debug message:" );
    app.SetDebug( true );
}
    Copy     Copy All       Run      
function()