Launch debugger as sudo on remote linux machine

Nakame 0 Reputation points
2023-09-08T06:40:05.3533333+00:00

Hello everyone !

I am working on a program using visual studio 2022 for a remote linux machine ( a raspberry pi ). Everything seem to be working fine but i now need to launch the program as administrator to access some fonctionalities .

So my question is : How can i tell the visual studio debugger to launch as sudo on my remote machine ?

Windows for business | Windows Client for IT Pros | User experience | Remote desktop services and terminal services
Developer technologies | Visual Studio | Debugging
Developer technologies | C++
{count} votes

3 answers

Sort by: Most helpful
  1. Guido Franzke 2,191 Reputation points
    2023-09-08T08:44:07.8866667+00:00

    Hello,

    you must run your Visual Studio as Admin, then your code will run as Admin in Debugger too.

    Regards, Guido


  2. Nakame 0 Reputation points
    2023-09-11T06:46:05.3966667+00:00

    Hello ! I am still looking for a solution to this problem. Anybody can help ?

    0 comments No comments

  3. Guido Franzke 2,191 Reputation points
    2023-09-12T06:29:39.6333333+00:00

    Check this article: https://learn.microsoft.com/en-us/visualstudio/debugger/remote-debugging?view=vs-2022

    In chapter "Configure the remote debugger":

    "If you need to add permissions for other users to connect to the remote debugger, choose Tools > Permissions. You must have administrator privileges to grant or deny permissions.

    Important

    You can run the remote debugger under a user account that differs from the user account you are using on the Visual Studio computer, but you must add the different user account to the remote debugger's permissions."

    HTH.

    Regards, Guido

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.