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?