Is it possible to run or debug my code with the "sudo" command remotely?


I'm working on a centos7 server remotely from an M1 Mac. Is it possible to run or debug my c++ code with the "sudo" command remotely?


more info:

JetBrains Client 2022.1.2
Build #JBC-221.5787.29, built on June 1, 2022
Licensed to
Subscription is active until February 10, 2023.
Runtime version: 11.0.15+10-b2043.56 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 12.4
Controller in Remote Development (CL)
GC: G1 Young Generation, G1 Old Generation
Memory: 1504M
Cores: 8

Non-Bundled Plugins:
    com.intellij.plugins.xcodekeymap (221.5787.15)
    com.intellij.plugins.xcode.colorscheme (221.5787.15)
    com.intellij.plugins.warmneon.colorscheme (221.5787.13)
    com.intellij.plugins.visualstudiokeymap (221.5591.37)
    com.intellij.plugins.vibrantink.colorscheme (221.5787.15)
    com.intellij.plugins.twilight.colorscheme (221.5787.20)
    com.intellij.plugins.resharperkeymap (221.5787.15)
    com.intellij.plugins.rails_casts.colorscheme (221.5787.15)
    com.intellij.plugins.qtcreatorkeymap (221.5787.15)
    com.intellij.plugins.netbeanskeymap (221.5591.37)
    com.intellij.plugins.monokai.colorscheme (221.5787.20)
    com.intellij.plugins.github.colorscheme (221.5787.20)
    com.intellij.plugins.espresso.colorscheme (221.5787.13)
    com.intellij.plugins.eclipsekeymap (221.5591.37)
    com.intellij.plugins.dawm.colorscheme (221.5787.15)
    com.intellij.plugins.cobalt.colorscheme (221.5787.15)
    com.intellij.plugins.blackboard.colorscheme (221.5787.15)
    com.intellij.plugins.all_hallows_eve.colorscheme (221.5787.15)

1 comment
Comment actions Permalink


Yes, you can enable the "Run with root privileges" option in your run/debug configuration (`Run | Edit Configurations... `), see But you might face the issue with debugging as root, unfortunately - If you face it, feel free to comment or upvote the issue in order to get updates. See if you are not familiar with YouTrack.


Please sign in to leave a comment.