Hyunjik Bae
Hyunjik Bae

Reputation: 2929

Debugging multiple dotnet programs with same dotnet.exe process name

Given that there are two dotnet core programs: App1 and App2. The compile output of App1 and App2 is App1.dll and App2.dll respectively.

As running dotnet application is like this,

dotnet.exe App1.dll
dotnet.exe App2.dll

when I open Attach Process dialog box in Visual Studio, they show the same dotnet.exe process name instead of App1 or App2. So I cannot distinguish App1 from App2.

Is there any recommended or better way of attaching debugger to the different dotnet core programs?

Upvotes: 0

Views: 317

Answers (1)

ryzngard
ryzngard

Reputation: 146

The easiest way I can think of is to look at the command line info for the process.

In powershell that would be like Get-WmiObject Win32_Process -Filter "name = 'dotnet.exe'" | Select-Object CommandLine

You can look at this SO answer for more details

Upvotes: 1

Related Questions