none
How to debug custom <Module> injected code. RRS feed

  • Question

  • I have a problem debugging my Project. I'ts a mixed C#/C++ solution with some pure C# written projects, some pure C++ dlls, and some mixed C#/C++ assemblies.
    One of my projects is a post-compiler processor, that catches some [Attributed] members and put them into <Module> .cctor to make some sort of automatic dll registration.

    My problem is that we have a bug inside one of these <Module> code and we can't debug <Module> cctor easily.

    Any advices to an approach to debug code inside <Module> .cctor????

    Thanks in Advance!
    Monday, November 13, 2017 10:50 AM

All replies

  • Does your post-compiler processor also update the source mappings in the PDB?

    Debugging gets more difficult without the source mappings but should still be possible, though you may have to disable "Just My Code". You can add breakpoints in methods you don't have source/source-mappings for from the breakpoints window (you will need to enter the full type and method name). You can also add breakpoints and step through the code from the disassembly window, but this can be hard to follow if you are not used to it.

    Monday, November 13, 2017 9:00 PM