Discussion:
Debugging a solution containing a Managed C# & a C++ DLL
(too old to reply)
Harry Whitehouse
2007-10-08 04:08:48 UTC
Permalink
I have a single VS2005 solution which contains three nodes:

1) C# class lib
2) CPP DLL
3) A test client which accesses both the 1) and 2)

VS 2005 has created subdirectoies for each sub-project. In project
properties for the DLL, I have changed the target directory for both the DLL
and PDB file to c:\windows so my test client can "see" the DLL. Everything
builds and operates in non-debug mode just fine.

My problem is with debugging. I can step through my test client into any
part of my class lib with ease. However, when I try to set a breakpoint in
my DLL code, the breakpoint seems to "set" (a red button appears to the left
of the line), but I never stop at the breakpoint.

I'm wondering is this problem is caused by my moving the target directory to
c:\windows for my DLL and associated PDB file.

Can anyone offer some hints as to what I might be doing wrong? Is it
possible to do what I'm trying to do?

Best

Harry

P.S. I originally posted this in vstudio.public, but I think this is a
better newsgroup. Pardon the dual posting.
David Lowndes
2007-10-08 06:55:49 UTC
Permalink
Post by Harry Whitehouse
VS 2005 has created subdirectoies for each sub-project. In project
properties for the DLL, I have changed the target directory for both the DLL
and PDB file to c:\windows so my test client can "see" the DLL.
If you set the dependencies for the projects, I don't think you would
need to do that.
Post by Harry Whitehouse
My problem is with debugging. I can step through my test client into any
part of my class lib with ease. However, when I try to set a breakpoint in
my DLL code, the breakpoint seems to "set" (a red button appears to the left
of the line), but I never stop at the breakpoint.
There's a setting you need to change in the test client property pages
- under the Debug tab - to enable mixed debugging of managed and
native code.

Dave
Harry Whitehouse
2007-10-08 16:05:30 UTC
Permalink
David -- The debug tab in the test client did the trick!! Thank you SOOOO
much!

Harry
Post by David Lowndes
Post by Harry Whitehouse
VS 2005 has created subdirectoies for each sub-project. In project
properties for the DLL, I have changed the target directory for both the DLL
and PDB file to c:\windows so my test client can "see" the DLL.
If you set the dependencies for the projects, I don't think you would
need to do that.
Post by Harry Whitehouse
My problem is with debugging. I can step through my test client into any
part of my class lib with ease. However, when I try to set a breakpoint in
my DLL code, the breakpoint seems to "set" (a red button appears to the left
of the line), but I never stop at the breakpoint.
There's a setting you need to change in the test client property pages
- under the Debug tab - to enable mixed debugging of managed and
native code.
Dave
Loading...