views:

1536

answers:

3

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.

Is there anyway around this?

+5  A: 

You can't. Visual Studio disables data breakpoints when running anything but pure, native code. See this post for a partial explanation why from a VS Program Manager.

Stu Mackellar
+3  A: 

So to do this I had to:

  • set the unmanaged dll as the startup project
  • set the managed program as the startup command
  • set debug mode as Native

yech

jyoung
A: 

You can get similar effect as Data Breakpoint if add into your source simple condition:

if (requiredcondition) command;

and add break on 'command'.

Dmitry