18

I have a project that is deployed via a VS 2012 Azure Project (from right in VS, not manually). The web role project is set to build "pdb-only" Debug Info in release mode, but when deploying the PDBs are not packaged and copied to the web role VM on Azure. How do I get the PDBs to get included in the package and transmitted to the server?

The reason I want to include my PDBs in production is because I want to get line numbers in my ELMAH reports.

1 Answer 1

27
+50

I tried this out with a basic "File, New Cloud project" with the following settings:

  1. Web Project -> Properties -> Build -> Advanced -> Debug Info: pdb-only
  2. Web Project -> Properties -> Package/Publish Web -> Uncheck Exclude generated debug symbols

When I compiled and deployed a basic solution using these 2 settings, I found WebRole1.dll and WebRole1.pdb in the F:\AppRoot\Bin\ folder.

Is this what you were looking for?

4
  • Wow, thanks. I overlooked the Publish tab since I don't personally use it (Azure uses it automagically). That may be the easiest bounty you'll ever earn :)
    – pbristow
    Commented Oct 29, 2012 at 15:19
  • 1
    This also works when set up for Git/TFS publishing. You can check the deployment logs for messages like: Copying file: 'bin\MyAssembly.pdb' Commented Apr 3, 2013 at 0:45
  • 1
    +1000 This works for Azure Web Sites (WAWS) as well. Finally have decent ysod error messages with line numbers! Commented Apr 20, 2013 at 4:08
  • (follow up 5 years later...) Make sure that the Exclude generated debug symbols is actually set to false in your csproj file. Not having an entry wasn't working for me on Azure Application Insights. I checked then unchecked the box to see the change in the csproj file. Then I could see line numbers on App Insights. More info: github.com/Azure/azure-webjobs-sdk/issues/… Commented Aug 30, 2018 at 2:16

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.