I would like to run a console application with elevated permissions. Running it from command line with sudo mono myapp.exe works but then I can't see a way to attach to the process for debugging. Is there a way to do this in MonoDevelop directly?
It's possible but nontrivial.
Setting the MONODEVELOP_SDB_TEST environment variable will cause a new "Run->Run With->Custom Soft Debugger" command to show up in MD. You can use this to invoke the Mono debugger and connect it to MonoDevelop.
sudo mono --debugger-agent=${AgentArgs} yourapp.exe
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With