5

I'm trying to debug an Azure application that publishes web services, and Visual Studio 2012 refuses to show source, even with PDB loaded. Here is my setup:

On DEBUG > Options and Settings... > Debugging > General:

  • [ ] Enable Just My Code
  • [ ] Enable .NET Framework source stepping
  • [x] Enable source server support
  • [ ] Require source files to exactly match the original version

On DEBUG > Options and Settings... > Debugging > Symbols:

Solution properties > Debug Source Files:

  • c:\path\to\my\CSfiles\
  • c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\crt\src\
  • etc

Steps to reproduce:

  1. Deploy Azure application to Development Fabric (Compute Emulator).
  2. Open VS2012 as administrator.
  3. Attach to WaWorkerHost.exe, wait for symbol load and verify that MyModule.dll is loaded with symbols.
  4. [optional] Choose Solution Properties... > Debug Source Files and add c:\path\to\my\CSfiles\ as first entry.
  5. Choose DEBUG > New Breakpoint > Break At Function...
  6. Function: MyClass.MyMethod. Language: C#.
  7. VS2012 complains it was unable to find, but it adds the breakpoint.
  8. Make the breakpoint hit.
  9. Once hit, double click on first item of "call stack". It's the MyClass.MyMethod, called by a class from System.ServiceModel.dll.
  10. VS2012 shows the "No Source Available" with only the "Show Disassembly" option (image below):

enter image description here

At Call Stack window, if I right-click on the current method (which was hit by the breakpoint), and choose Symbol Load Information..., the last line shows:

c:\path\to\my\PDBs\MyModule.pdb: Symbols loaded.

If I open DEBUG > Windows > Modules, my module shows correctly:

  • Path is correct.
  • Optimized = No.
  • User Code = N/A (like everything else).
  • Symbol Status = Symbols Loaded.
  • Symbol File = c:\path\to\my\PDBs\MyModule.pdb (that's correct).

An yes, the application was built with full debug information. I already dumped the PDB using this tool, and it shows my source code at correct location.

Interesting enough, I can see all sources from .NET Framework. I just cannot see my own source, which is really frustrating.

I already deleted any .suo file from the user-dir\Documents\Visual Studio 2012\Projects, but didn't help. I guess it won't help since I always attach to an executable, which automatically creates a new fresh solution.

fernacolo
  • 7,012
  • 5
  • 40
  • 61

1 Answers1

0

I thought Microsoft released all code for .net. But apparently the ServiceModel assemblies are still closed.

Could be that ServiceModel does some magic prior calling your code that makes the debugger confused.

But for your problem it sounds like the service is running an old version of your dll.

Try uncheck the setting "Require source files to exactly match the original" and see if it breaks at your breakpoint. If it hits your breakpoint at that stage then it means there some issue while deploying your dll.

Have you tried any decompiler like resharper to see if it works?

harre
  • 59
  • 7