473,386 Members | 1,827 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Debug a C++ DLL from a C# Windows app in VS.NET2005

I have been trying to set breakpoints inside a C++ DLL and running a C#
application which calls the exported functions from the C++ DLL. However,
when I run my solution in debug mode it always says

"The breakpoint will not currently be hit. No symbols have been loaded for
this document."

where I haved placed the breakpoint.
In the properties of my C++ app (which is not managed by the way)
Configuration Properties -Debugging -Command I have set my C#
application. What more do I need to do?
Aug 15 '06 #1
3 1105
"Joachim" <Jo*****@discussions.microsoft.comwrote in message
news:07**********************************@microsof t.com...
>I have been trying to set breakpoints inside a C++ DLL and running a C#
application which calls the exported functions from the C++ DLL. However,
when I run my solution in debug mode it always says

"The breakpoint will not currently be hit. No symbols have been loaded for
this document."

where I haved placed the breakpoint.
In the properties of my C++ app (which is not managed by the way)
Configuration Properties -Debugging -Command I have set my C#
application. What more do I need to do?
There are a few things that can bite you:

1) Make sure you have one and only one copy of the DLL that you want to
debug where the IDE is likely to find it

2) If you move it from the development directory, make sure you move the PDB
file as well

3) Make sure you have optimizations switched off

4) Make sure you haven't turned off native debugging support as might be the
case by default if you are debugging a C# project

Regards,
Will
Aug 15 '06 #2
Thanks Will,

I just solved it myself. This is what I did:

Properties on the C# app
Debug -Enable unmanaged code debugging
Start the C# app

Regards,
Joachim
"William DePalo [MVP VC++]" wrote:
"Joachim" <Jo*****@discussions.microsoft.comwrote in message
news:07**********************************@microsof t.com...
I have been trying to set breakpoints inside a C++ DLL and running a C#
application which calls the exported functions from the C++ DLL. However,
when I run my solution in debug mode it always says

"The breakpoint will not currently be hit. No symbols have been loaded for
this document."

where I haved placed the breakpoint.
In the properties of my C++ app (which is not managed by the way)
Configuration Properties -Debugging -Command I have set my C#
application. What more do I need to do?

There are a few things that can bite you:

1) Make sure you have one and only one copy of the DLL that you want to
debug where the IDE is likely to find it

2) If you move it from the development directory, make sure you move the PDB
file as well

3) Make sure you have optimizations switched off

4) Make sure you haven't turned off native debugging support as might be the
case by default if you are debugging a C# project

Regards,
Will
Aug 15 '06 #3
"Joachim" <Jo*****@discussions.microsoft.comwrote in message
news:50**********************************@microsof t.com...
Thanks Will,
You are welcome.
I just solved it myself. This is what I did:

Properties on the C# app
Debug -Enable unmanaged code debugging
Start the C# app
That's #4 on my list. Managed projects by default have managed debugging
enabled only.

Regards,
Will
Aug 15 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Julian | last post by:
I upgraded this program from VC6 to .NET2003 a few months back. I had to change some of the source code, but I was finally able to get it to compile and link properly. I just tried to upgrade...
0
by: anupamak | last post by:
Hello everybody, I have gone through lot many articles regarding the SOAP in webServices. I did many applications in the windows service in .net2005. Now my new requirement is to create a new...
2
by: =?Utf-8?B?TWFyYyBBbGxhcmQ=?= | last post by:
Hello, I have posted this message in the normal newsgroup instead of posting it in the managed ones. I have a project in VB6 (GDI+) that will read a WMF File (created by my customer) and then...
2
mafaisal
by: mafaisal | last post by:
Hello Experts I am Using vb.net2005 How To Know a File or Folde is Exist in Specific Folder Using vb.net2005 eg : test.txt this file is exist in D:\Faisal Hw to check this Faisal
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.