1

I'm setting a break point in the static Main() entry point function(in App.g.i.cs) in the default wpf project created by visual studio 2012, targeting .net 4.5. However, when I debug it, it's constantly skipping my break point and complaining that no symbols have been loaded for this document.

I've tried everything in this solution: Why does my C# debugger skip breakpoints?

and also restarted vs 2012 several times; also tried running the release candidate but have got no luck. I even downloaded symbols for .net itself and enabled "Enable .NET Framework source stepping" in tools->options->debugging->General.

What can I possibly miss here?

Please enlighten me!

h9uest

Community
  • 1
  • 1
h9uest
  • 10,958
  • 3
  • 18
  • 24

1 Answers1

1

You cannot debug *.g.i.cs file. (ofcourse unless you have reflector plug-in integrated in your VS2012)

When App.xaml is built, MSBuild generates the actual code that represents what was declared in App.xaml, storing the code in App.g.i.cs.

Rohit Vats
  • 79,502
  • 12
  • 161
  • 185
  • Hi Rohit. Thanks for the response. Do you know why the design goes this way: no symbol file gets loaded for *.g.i.cs? In principle, the automatic source code generation(from xaml to g.i.cs) takes place at compile time and after it's done, the compiler could simply generate symbol tables for the g.i.cs and load them when dubugging. Question: why does it NOT do this? – h9uest Jan 28 '14 at 09:47
  • 1
    For debugging you need PDB files but i guess after compiling it doesn't emit out `.pdb` files of `*.g.i.cs`. If you want to debug it, install reflector plug-in for VS2012. – Rohit Vats Jan 28 '14 at 10:24