4

I have a .Net Core Web Api service published on Azure. When it's deployed to the wwwroot folder I can attach the debugger to the hosted instance and debug it fine. However we want our UI deployed to the root and the API deployed to a virtual directory in the same Web App under /api, similar to this suggestion, in order to avoid CORS issues.

Whenever I try and debug it in the sub-directory, it all attaches fine but then all breakpoints display the dreaded message:

The breakpoint will not currently be hit. No symbols have been loaded for this document.

Things I've checked:

  • debugging is enabled in the Azure portal and the correct VS version is selected
  • there are no errors either on publish or on attaching the debugger which indicate problems with symbols being loaded
  • the configuration is set to Debug when published
  • I have tried setting and clearing the "Just My Code" flag to no avail
  • I've published the same API to the root of the Web App and I could debug successfully first time, no issues, but as soon as I republish back to /api debugging fails.

Is this a known limitation that I've missed? Is there any workaround to allow remote debugging in this scenario?

pcdev
  • 2,852
  • 2
  • 23
  • 39
  • I just created a [blog post](https://www.locktar.nl/uncategorized/azure-remote-debugging-manually-in-visual-studio-2017/) on how this debugging works in Visual Studio. Apparently there is also an [issue](https://github.com/Azure/Azure-Functions/issues/844#issuecomment-407128621) that could cause your problem with .NET Core. I had the same issue. – LockTar Jan 10 '19 at 11:55
  • Thanks Ralph! I think I tried all those things, but neither your blog post nor the issue you referenced specifically mentions deploying to a virtually directory, which appears to be my issue. It works fine when deployed to root, but as soon as I change the deploy target to the subdirectory, I get this issue. I probably should ask on the .Net Core or VS GitHub issues pages but I've moved on from this issue for now. – pcdev Jan 10 '19 at 20:04

0 Answers0