2

I am trying to remote debug my net46 ASP.NET Core application in Azure. It appears the debugger attaches to the process just fine (WebApiNetCore.exe), however the breakpoints I've set are not being hit.

The available processes I have to choose from are here.

I've tried selecting all of these options and they don't seem to work either.

Is it currently possible to remote debug a net46 ASP.NET Core application?

6
  • have you tried to change code type in "attach to" option? Try "automatically determine the type" or "Managed CoreCLR". Also where did you set breakpoints? I ask as for example initializing methods in Startup class cannot be reached. Commented Oct 12, 2016 at 8:50
  • I have. I have tried both and neither hit the breakpoints. The symbols do not load either, as they usually would before a breakpoint is hit. It is a webApi app, so the breakpoints are set after a REST call is received. I can verify that the startup class can be reached because the WebApi functions normally and is working on Azure. Commented Oct 12, 2016 at 15:35
  • See if this helps - blogs.msdn.microsoft.com/webdev/2016/03/21/… Commented Oct 12, 2016 at 15:41
  • I've tried the link. It doesn't apply as I do not have the dnx.exe option. It is a ASP.NET Core 1.0 net46 app. Commented Oct 12, 2016 at 15:59
  • You should look for the exact process name (WebApiNetCore.exe in your case), not dnx.exe which has been removed in RC2. Have you tried to publish your app in debug not release mode? Commented Oct 21, 2016 at 11:50

2 Answers 2

5

I have found a resolution to this issue.

Originally, if I select "Attach to Debugger" through Cloud Explorer, I get the following error:

Error Message

So I tried the following steps to attaching a debugger manually:

  1. Download publish profile for my App from Cloud Explorer
  2. Make a note of the the username & userPWD
  3. In VS2015, Debug -> Attach to Process
  4. Select appropriate qualifier for the app(in my case it was internal.enowdev.com:4020)
  5. When entering credentials, will need to use the username & userPWD from user profile. Make sure to prefix the username with a ".\" to make the domain your local machine.
  6. Select the WebApi.exe Managed process.
  7. Symbols now load and debugger hits the breakpoints!
Sign up to request clarification or add additional context in comments.

2 Comments

worked for me on VS 2015 aspnet core target .net 452
Not accepting my credentials (currently as of May 2017). Trying every combination of '.\' prefix, no prefix, no '$' in front of the user name, '$' in front of the user name, azurewebsites.net domain name, custom domain name. It connects to Azure alright - it just won't accept the (up-to-date) credentials.
0

I had the same issue with invalid username/password. It turned out that remote debugging was turned off for that web app from Application Settings in Azure portal.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.