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 ?

Remote Desktop
Remote Desktop
A Microsoft app that connects remotely to computers and to virtual apps and desktops.
4,391 questions
C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,629 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
966 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Guido Franzke 2,196 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,196 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