Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Run console application with elevated permissions in MonoDevelop

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?

like image 491
Max Avatar asked Nov 13 '22 05:11

Max


1 Answers

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
like image 104
Mikayla Hutchinson Avatar answered Dec 06 '22 10:12

Mikayla Hutchinson