Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging a Managed Component from C++ Win32

I have a Win32 EXE that's written in VC++. I have implementation written in C#. I've got the VC++ EXE consuming the C# DLL as outlined here: http://support.microsoft.com/kb/828736. Works great, but I need to be able to debug. Both projects are loaded into the same .SLN, but breakpoints in the C# are never hit. Is there a way to debug this in VS2012?

like image 732
Todd Sprang Avatar asked Jul 26 '13 12:07

Todd Sprang


People also ask

How do I debug COM components?

In the console tree, select the COM+ library application containing the components you wish to debug. Right-click the application, and then click Properties. In the application's Properties dialog box, click the Advanced tab. Under Debugging, select the Launch in debugger check box.

Which options are available in debug mode?

Some of the major functions available with on-chip debug include: Interrupt or break into debug mode on program and/or data memory address. Interrupt or break into debug mode on a peripheral access. Enter debug mode using a DSP microprocessor instruction.

How do I enable debugging in Visual Studio?

In the Visual Studio toolbar, make sure the configuration is set to Debug. To start debugging, select the profile name in the toolbar, such as <project profile name>, IIS Express, or <IIS profile name> in the toolbar, select Start Debugging from the Debug menu, or press F5.

What is managed compatibility mode?

Use Managed Compatibility Mode: Replaces the default debugging engine with a legacy version to enable these scenarios: You are using a . NET language other than C#, Visual Basic, or F# that provides its own Expression Evaluator (this includes C++/CLI).


1 Answers

Ah, turns out this is easy if you know the right button to push. On the C++ project properties, Configuration Properties -> Debugging -> Debugger Type = "Mixed".

like image 85
Todd Sprang Avatar answered Oct 15 '22 23:10

Todd Sprang