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:
- [x] _NT_SYMBOL_PATH
- [ ] Microsoft Symbol Servers
- [x] c:\path\to\my\PDBs
- [x] http://referencesource.microsoft.com/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:
- Deploy Azure application to Development Fabric (Compute Emulator).
- Open VS2012 as administrator.
- Attach to WaWorkerHost.exe, wait for symbol load and verify that MyModule.dll is loaded with symbols.
- [optional] Choose Solution Properties... > Debug Source Files and add c:\path\to\my\CSfiles\ as first entry.
- Choose DEBUG > New Breakpoint > Break At Function...
- Function: MyClass.MyMethod. Language: C#.
- VS2012 complains it was unable to find, but it adds the breakpoint.
- Make the breakpoint hit.
- Once hit, double click on first item of "call stack". It's the MyClass.MyMethod, called by a class from System.ServiceModel.dll.
- VS2012 shows the "No Source Available" with only the "Show Disassembly" option (image below):
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.