Step through the “managed to native transition” in Visual Studio?

前端 未结 2 803
迷失自我
迷失自我 2021-02-07 12:49

While trying to answer this question I decided I need to step through the marshalling process by hand, in the debugger view.

Unfortunately, Visual Studio seems to jump r

2条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-07 13:39

    I'm surprised that no one has suggested that you show the external code in the debug window. If you right click on the [Native to Managed Transition] line and tick the Show External Code option, you will see exactly which methods are being called in the transition. This may give you a better idea. Here is an example:

    Display Native to Managed Transition

    You will then be able to double click on any (greyed out) line and a Disassembly page will open with the code. Another example:

    enter image description here

提交回复
热议问题