Visualstudio-docs: Which Exe to Attach to?

Created on 28 Mar 2019  Â·  4Comments  Â·  Source: MicrosoftDocs/visualstudio-docs

When I've been remote debugging ASP.NET Core apps I've been attaching to my exe i.e. MyASPApp.exe in this example but the demo attaches to dotnet.exe.

Is there pros/cons to either approach? Same difference?

Attaching to my exe feels safer compared to attaching to dotnet.exe. Seems like I could effect other apps, no?


Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

doc-bug support-request visual-studio-windowprod vs-ide-debutech

All 4 comments

@spottedmahn That's very interesting. I don't think that it was possible to connect to MyASP.exe in previous versions of the remote debugger and/or VS. If attaching to MyASP.exe gets you the debugger features you expect, yes, that sounds safer. I will need to test this before changing the doc, as that may not work in VS 2017. What version of VS are you running?

Works in VS 2017 on a .NET Core 2.0 web app for me.

@spottedmahn I'm updating the doc, mentioning the method you described. I can't get a repro on a local IIS, so I will also leave in the dotnet.exe info for the time being until I have better info.

Hi @Mikejo5000 - I think I figured it out today why I'm seeing the differences: full framework vs core framework...

When targeting the full framework the exe is the app name. In core, I guess only a dll is produced and that DLL runs under dotnet.exe

Reference: Attaching the debugger

Was this page helpful?
0 / 5 - 0 ratings

Related issues

suhailmahmood picture suhailmahmood  Â·  3Comments

yingang picture yingang  Â·  3Comments

patrikhuber picture patrikhuber  Â·  4Comments

rlundy picture rlundy  Â·  3Comments

CeciAc picture CeciAc  Â·  3Comments