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?
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@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