Discussion:
How to Debug MFC dll
(too old to reply)
Cagespear
2007-02-15 17:57:58 UTC
Permalink
I have a VS 2003 soln with 2 projects - 1 MFC Dialog based app and the other
MFC dll.

I am loading the MFC dll from my MFC app. If I set breakpoints in the MFC
dll code, it doesn't stop there. How do I debug the dll ?

Regards,
Amit
AliR (VC++ MVP)
2007-02-15 18:01:30 UTC
Permalink
Is the DLL linked in with the App or do you dynamically load it?

AliR.
Post by Cagespear
I have a VS 2003 soln with 2 projects - 1 MFC Dialog based app and the other
MFC dll.
I am loading the MFC dll from my MFC app. If I set breakpoints in the MFC
dll code, it doesn't stop there. How do I debug the dll ?
Regards,
Amit
Saul775
2007-02-15 18:05:12 UTC
Permalink
You can do it by the following...

Just open your DLL project and try running it. If no associated command is
with the project, it will pop up a box indicating what program you want to
use to open it. You can select your MFC app that you created.

The other option is to open the properties of the project (Project --> XXX
Properties...). Then under Configuration Properties, select Debugging. In
it, you should set the Command to your MFC app and, if desired, set the
arguments as well. That should do it if you run the program.

If you have more questions, please don't hesistate to ask.

Saul775
Post by Cagespear
I have a VS 2003 soln with 2 projects - 1 MFC Dialog based app and the other
MFC dll.
I am loading the MFC dll from my MFC app. If I set breakpoints in the MFC
dll code, it doesn't stop there. How do I debug the dll ?
Regards,
Amit
Saul775
2007-02-15 18:40:17 UTC
Permalink
That is, you should also make the DLL the default project for the solution.
Post by Saul775
You can do it by the following...
Just open your DLL project and try running it. If no associated command is
with the project, it will pop up a box indicating what program you want to
use to open it. You can select your MFC app that you created.
The other option is to open the properties of the project (Project --> XXX
Properties...). Then under Configuration Properties, select Debugging. In
it, you should set the Command to your MFC app and, if desired, set the
arguments as well. That should do it if you run the program.
If you have more questions, please don't hesistate to ask.
Saul775
Post by Cagespear
I have a VS 2003 soln with 2 projects - 1 MFC Dialog based app and the other
MFC dll.
I am loading the MFC dll from my MFC app. If I set breakpoints in the MFC
dll code, it doesn't stop there. How do I debug the dll ?
Regards,
Amit
Continue reading on narkive:
Loading...