Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to select debug profile in Visual Studio?

I have a .NET Core 3 (not ASP) project in Visual Studio 2019 that has two different launch profiles:

enter image description here

But whenever I launch my project, it always uses the first profile, even if I have the second profile selected in my project settings. How do I tell Visual Studio to actually use the other launch profile?

EDIT: This is what my toolbar looks like:

enter image description here

I have no dropdown to select a launch configuration. I found the "Start Debug Target" command and can add that to my toolbar, but it doesn't have a dropdown either, it looks just like the regular start button.

like image 704
Walt D Avatar asked Oct 06 '19 21:10

Walt D


People also ask

How do I Debug a different user in Visual Studio?

Open Command Prompt. Change directory to where your application's .exe file is located. Execute the following command: runas /user:domain\username Application.exe.

What is a Debug profile?

A debugging profile specifies a set of one or more application programs which are to be debugged together. For example: All instances of program PYRL01 running in system CICS1. All Java™ classes with names beginning setBankAccount. All programs with names beginning 'PYRL' run by user APPDEV02.

How do I change Debug config in Visual Studio?

In Solution Explorer, right-click the project and choose Properties. In the side pane, choose Build (or Compile in Visual Basic). In the Configuration list at the top, choose Debug or Release. Select the Advanced button (or the Advanced Compile Options button in Visual Basic).


1 Answers

In projects you can configure the profile, not select it. In order to select a profile you should choose it from dropdown list next to start button:

enter image description here

EDIT

On my VS the button is called Debug Target and is placed under Standard section in toolbar.

However, there's something fishy about this button in visual studio. When I removed button from visual studio I couldn't find it among other commands to readd it. After some googling I even found out there were problems with this in past. https://developercommunity.visualstudio.com/content/problem/323626/if-you-remove-debug-target-from-toolbar-you-can-ne.html

Ewentually I found out two ways to bring it back.

  1. Reset the standard toolbar

enter image description here

  1. Add it from Add or remove buttons section next to standard toolbar

enter image description here

like image 73
Hubert Avatar answered Oct 05 '22 23:10

Hubert