🖥️ JS Console

Введи в Console Eval (FAB 🐞 → Console), нажми Run (или Ctrl+Enter).

DOM query

CommandDescription
$("#main")document.querySelector
$$("details")array of elements
$$("details").lengthcount
$$("button").map(b => b.id)map over nodes
$("h1").textContenttext

Inspect / Select

CommandDescription
inspect($("#main"))highlight + show in info panel
inspect(document.body)inspect body
domInspect()toggle select mode
domInspectStop()exit select mode
domShowFloating()open floating DOM tree
_domRefresh()refresh tree
_domToggleRoot()overlay <-> page

JS Logs

CommandDescription
log("test", 123, {a: 1})push to JS Logs (V)
warn("careful")push (W)
error("oops")push (E)
MtapiDebug.buffer().lengthJS logs count
MtapiDebug.errors()persistent errors array
clearEval()clear output

Debug tabs

CommandDescription
MtapiDebug.open()open overlay
MtapiDebug.close()close overlay
MtapiDebug.setTab("logs")switch to Logs
MtapiDebug.setTab("console")Console Eval
MtapiDebug.setTab("errors")Errors
MtapiDebug.setTab("logcat")Logcat
MtapiDebug.setTab("devtools")DevTools
MtapiDebug.setTab("system")System
MtapiDebug.setTab("network")Network

Perf

CommandDescription
MtapiDebug.perf("my-test", 42)record perf metric
MtapiDebug.time("x")start timer
MtapiDebug.timeEnd("x")end timer + record
MtapiDebug.selectElement("#main h1")select + inspect

Network (logged)

CommandDescription
fetch("/ping").then(r => r.json()).then(j => log(j))GET /ping
fetch("/battery").then(r => r.json()).then(j => log(j))GET /battery
fetch("/system").then(r => r.json()).then(j => log(j))GET /system
fetch("/sensors").then(r => r.json()).then(j => log(j))GET /sensors

Native (APK only)

CommandDescription
Android.getLogcat(20)logcat (20 lines)
Android.processList()running processes
Android.getDeviceInfo()device info

Browser overlay

CommandDescription
_browserOpen()open (default /help)
_browserOpen("https://example.com")open URL
_browserNavigate("https://example.com")navigate
_browserClose()close

AI Snap (advanced)

CommandDescription
inspect($("#main"))select first
_aiSnap()markdown of selected
_aiSnapWithRequest("make it red")markdown + task
_captureElement()copy outerHTML

Help levels

CommandDescription
?quick (5-7)
??cheatsheet (all)
???full (examples + navigation)
help()same as ?