Martin Lottering
Martin Lottering

Reputation: 1782

How To Fix “The Debugger you selected cannot be started” (2)

This question is a duplicate of another question with the same name, but with a different context and none of those suggestions worked for me.

I have a few processes which I start with a "-debug" command line argument which instructs those processes to invoke Debugger.Launch()

That used to work great, and I could debug those processes inside visual studio and step through the code, but since I installed Visual Studio 2017, it deteriorated a bit.

This is what happens now:

  1. I start the process with the additional -debug command line argument.
  2. The process invokes Debugger.Launch()
  3. I see this window:

    enter image description here

  4. I select the last option Visual Studio 2017

  5. Then I get this:

    enter image description here

  6. I click "Yes" and then I'm back at step number 3, now repeat 3 to 6 indefinitely. :-)

I'm not sure why, but I can no longer use Visual Studio 2017 to debug my projects using this method, and this was working a day or so ago, I just had to go through the iteration twice, but Visual Studio 2017 did eventually start up.

Any help or pointers would be appreciated.

Upvotes: 1

Views: 925

Answers (1)

Martin Lottering
Martin Lottering

Reputation: 1782

It turns out all I needed to do was make sure I am running the initial process or script as administrator.

enter image description here

Upvotes: 4

Related Questions