I wonder if there is any way to debug c++ dll called from C# PInvoke in VS 2010. I tried to attach the project into c# application but it didn\'t work - didn\'t stop at a br
When attaching, change the "Attach to" value to "Native". The process should not be running under the managed code debugger - instead of "Debug", use the "Run" command to start.
Also, the DLL needs to be compiled with debug info for any sensible debugging to take place. Make sure you're not P/Invoking the Release build.
The OutputDebugString() should work regardless of debugging mode, however.