StikDebug/StikJIT/JSSupport/attachDetach.js
Huge_Black 354333d873
JS controlled Debug Proxy (#211)
* ensure heartbeat happened recently before enabling jit

* JS controlled Debug Proxy

* Fix heartbeat issue & JS nil issue

* Update idevice

* Fix compile issue
2025-07-04 12:24:00 -04:00

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()