I am developing a C++ application that requires root privilege. I am working under Eclipse and I would like to be able to launch/debug from it.
I know I could start Eclipse as a root, but I am looking for other options, such as somehow requesting the elevation in the launch configurations.
Any idea ?
Note that my question is not about how to discourage myself to debug with root privilege.
rootthat is likely to contain errors. I suggest to debug the program with modifications and/or in a special testing environment that allow running it withoutrootprivilege. I suggest to edit the question and add details about the program why it needs to run asrootto get more specific hints how to do this. Maybe you can run the program withgdbserverasrootoutside eclipse or as an external tool from Eclipse, and usegdbserverbased "remote" debugging in Eclipse../myapptosudo /absolute/path/to/mypapp(and edit/etc/sudoersaccordinlgy) ?sudo gdbserver other_args... your_programas an external tool (green button with red toolbox) and use remote debugging, see e.g. stackoverflow.com/q/4038760/10622916.