Remotely debugging .net core console apps on different remote machines

EuroEager2008 171 Reputation points
2020-11-12T17:13:51.377+00:00

I have a .net core console project (3.1 or 5, doesn't matter) for which I may easily setup different configurations for build (e.g. release, debug, debug2 etc.) with separate output paths etc.

Now I want to do remote debugging on different remote machines, but the project settings debug tab does not allow me to set up different machines, authentication modes, working directories etc.

I assume this must be possible, but not able to figure out.
Is launchsettings.json a way to go? (please note console app, not ASPNET). How?

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.
987 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Dylan Zhu-MSFT 6,416 Reputation points
    2020-11-13T06:38:17.47+00:00

    Hi EuroEager2008,

    Firstly, you need to download the remote debugger tool on remote machine, then run it in administrator mode.

    And then type the related parameters like this image;
    39574-image.png

    Please note: the directory of the executable file must be same in the local machine and remote machine.

    Best Regards,
    Dylan

    0 comments No comments

  2. EuroEager2008 171 Reputation points
    2020-11-13T07:30:24.933+00:00

    Thanks, but I think you didn't really understand my question.
    I mentioned the word "different" (means "multiple").
    However, I think my vague assumption regarding launchsettings.json leads me on the right track by using the setting for profiles (which I was too blind too see because my mind was centered around the Configuration and Platform settings which are both disabled.
    I will report back on this.

    Meanwhile: What are the Configuration and Platform settings used for in .net core (I have only seen them disabled, but I expect them to be enabled in a certain context otherwise they should not be there in the first place), please explain.

    39609-image.png


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.