mirror of
https://github.com/StikDebug/StikDebug.git
synced 2026-10-16 04:20:30 +00:00
* ensure heartbeat happened recently before enabling jit * JS controlled Debug Proxy * Fix heartbeat issue & JS nil issue * Update idevice * Fix compile issue
18 lines
583 B
JavaScript
18 lines
583 B
JavaScript
function attach() {
|
|
log("Welcome to use StikDebug's srcipting feature! Here you can use JavaScript to customize your debug experience!")
|
|
log("This script is a demo script that attaches to the connected app and detaches from it.")
|
|
|
|
// get pid of the connected app
|
|
let pid = get_pid();
|
|
log(`pid = ${pid}`)
|
|
|
|
// attach
|
|
let attachResponse = send_command(`vAttach;${pid.toString(16)}`)
|
|
log(`attach_response = ${attachResponse}`)
|
|
|
|
// detach
|
|
let detachResponse = send_command(`D`)
|
|
log(`detachResponse = ${detachResponse}`)
|
|
}
|
|
|
|
attach()
|