How can we help you today? How can we help you today?

How to get the debug information from an IStatement?

Hello,
in the Reflector API, is there a way to get the corresponding source code and line from an IStatement or IHasIlOffset?

I would like to be able to display the C# source code directly instead of the C++ code that I generate (by using #line etc...).

Regards,
Olivier
Xerces
0

Comments

1 comment

  • Clive Tong
    Sorry, but the in-memory object model doesn't have any such information within it.

    Source code is generated when the object model is fed through a language writer (for a particular language) which writes the lines to the various files. There's no exposed way for your code to get inside the language writer in order to record location information.
    Clive Tong
    0

Add comment

Please sign in to leave a comment.