c# - Debugging Dllimport code -


is possible see/debug code c# compiler generates methods dllimport attribute? tried stepping method defined dllimport attribute inside vs debugger not allow me this. in disassembly view can see call instruction particular address, when hit f11 key (step into) steps on it. have "enable native code debugging" checkbox checked in project properties.

update

if understand correctly, compiler performs operations when sees dllimportattribute attached method. couldn't find in dllimportattribute class documentation. source code dllimportattribute class has basic class definition. in debugger when calling external function can see call ffa0c0c8 assembly instruction , when step it, moves imported function body, imported function has different address ffa0c0c8. couldn't change disassembly view address. looks dll loading logic inside function, debugger skips. i'm wondering if library function or function generated compiler?

you can debug p/invoke calls if enable native debugging, , if have symbols , source dll.

if trying step p/invoke call windows dll fail since don't have source code dll.

edit

if meant want debug actual clr code marshalling , actual native call dll, answer's no - don't think that's possible.


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -