Post date: May 13, 2017 3:49:17 AM
This week, Microsoft released the new Xamarin Live Player app for iOS and Android, which promises to allow Xamarin/MonoTouch development on a mobile device without cables, a Mac, or setting up Xcode/code signing. So I grabbed it and set out to find out how it works, so that I can use other IDEs for Xamarin Live development.
After starting the Android version of the app, running Netstat revealed a new listening port:
angler:/ $ netstat -l|grep LISTEN
tcp 0 0 0.0.0.0:37847 0.0.0.0:* LISTEN
Connecting to that port gives:
$ nc 192.168.1.2 37847
DWP-Handshake
A quick Google search showed that this is the Mono debugger protocol, so after downloading SDP, I was able to attach to the running process:
$ sdb
Welcome to the Mono soft debugger (sdb 1.2.5161.14879)
Type 'help' for a list of commands or 'quit' to exit
(sdb) remote 192.168.1.2 37847
Connecting to '192.168.1.2:37847'...
Inferior process '0' ('192.168.1.2:37847') started
And the Xamarin Live homescreen changed its status to "Connected".
The same port number and attach procedure worked on the iOS version as well.
Unfortunately, SDP does not support breaking on attach, so the debugger just hangs. To make my own loader for Xamarin Live, I'll have to find a debugger library that can break after attach, inject assemblies into the app, and launch them over the debugger protocol.