How do I set a Data Breakpoint in mixed( C#/C++ ) debugging?

前端 未结 4 2044
醉话见心
醉话见心 2021-02-04 01:04

I launch my program in C#, which then calls some unmanaged C++.

When I break on a line in the unmanaged C++, the \'New Data Breakpoint\' menu item is grayed out.

<
4条回答
  •  青春惊慌失措
    2021-02-04 01:44

    A very useful trick which works everywhere is to call breakpoints from code in special conditions:

    If (Condition)
        System.Diagnostics.Debugger.Break()
    

提交回复
热议问题