xamarin - Can I write to a file instead of the console when debugging? -
in xamarin, i'm using console (writeline) debug application.
is possible write lines directly file somewhere on host machine instead of using console debug? don't want write file on phone i'll use file in realtime on development machine.
the easy way:
- use console.writeline in app.
on host, execute this:
/developer/monotouch/usr/bin/mtouch --logdev > ~/myfile.log
and console.writeline output end in ~/myfile.log. downside you'll everything written device log, both ios , other apps (this can significant sometimes). should possible filter out output clever grep usage.
the more involved approach redirect console.writeline output sort of network stream sends data on wifi host machine (or web service instance).
the easy part redirect console.writeline output:
console.setout (mynetworkstream); the rest left exercise reader, since wasn't part of question :)
Comments
Post a Comment