Run a C++ program in Clion as root

前端 未结 5 1981
逝去的感伤
逝去的感伤 2021-02-14 03:38

I\'m trying to run a program written in C++ by using CLion v1.2 as super user. Anyone here knows how to run it as superuser? I\'m using CMake.

5条回答
  •  旧巷少年郎
    2021-02-14 04:20

    I solved this by remote debugging on local machine. I run gdbserver with root privileges and connected to it from CLion.

    To start gdbserver sudo gdbserver :port myapp, configure remote GDB debug with port

提交回复
热议问题