Back

IsDebugVisible

JS Py
Hello World

Returns if the debug view is currently visible to the user.

app.IsDebugVisible() → Boolean

See Also: Debug, ShowDebug

Example - Toggle Debug

function OnStart()
{
    app.CreateDebug();

    lay = app.CreateLayout( "linear", "VCenter,FillXY" );

    tgl = app.CreateToggle( "WiFi Access Point", -1, 0.1 );
    tgl.SetOnTouch( ShowDebug );
    tgl.SetChecked( true );
    lay.AddChild( tgl );

    app.AddLayout( lay );
}

function ShowDebug( show )
{
    app.ShowDebug( show );
    var vis = app.IsDebugVisible();
    app.ShowPopup( vis );
}
from native import app

def OnStart():
    app.CreateDebug()

    lay = app.CreateLayout("linear", "VCenter,FillXY")

    tgl = app.CreateToggle("WiFi Access Point", -1, 0.1)
    tgl.SetOnTouch(ShowDebug)
    tgl.SetChecked(True)
    lay.AddChild(tgl)

    app.AddLayout(lay)

def ShowDebug(show):
    app.ShowDebug(show)
    vis = app.IsDebugVisible()
    app.ShowPopup(vis)
    Copy     Copy All       Run