473,441 Members | 2,071 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,441 software developers and data experts.

Debug COM dll with .Net app in VS.Net

I've inherited a COM dll project that was switched from the VS6 environment
to VS.Net. I thought I could debug the COM dll code by adding a VB.Net
project to the solution, but when I set breakpoints in the dll, the code in
the VB test program just passes over them. I'm guessing that it has
something to do with the VB project referencing the dll interop layer,
rather than the dll itself.

Is it possible to do what I'm trying to do? Anyone have any suggestions?

Thanks,

Gary ...

Nov 17 '05 #1
2 2820
VS.NET has several debug engines for different purposes:
* unmanaged debugging
* managed debugging
* script (classic ASP) debugging
* ...

Your NET project by default uses the managed debugging engine. Therefore,
breakpoints in unmanaged code will not be hit.
You can change this via the debug project settings. If you choose mixed, the
managed and the unmanaged debugging engines will be started, however this is
very slow. If you choose native, you cannot set breakpoints in managed code,
but in unmanaged code. I usually prefer this option, since it is much
faster.

Marcus


"Gary James" <ga***@iotech.com> wrote in message
news:es**************@tk2msftngp13.phx.gbl...
I've inherited a COM dll project that was switched from the VS6
environment
to VS.Net. I thought I could debug the COM dll code by adding a VB.Net
project to the solution, but when I set breakpoints in the dll, the code
in
the VB test program just passes over them. I'm guessing that it has
something to do with the VB project referencing the dll interop layer,
rather than the dll itself.

Is it possible to do what I'm trying to do? Anyone have any suggestions?

Thanks,

Gary ...

Nov 17 '05 #2
Marcus,

I tried your suggestion, and at first it didn't appear to work. But after
playing with it for a while, I found that it worked if I checked the
"Unmanaged Code Debugging" checkbox in the VB.Net project settings, and not
the "Debugger Type" setting in the COM dll project settings.

Thanks for the suggestion.

Gary James
"Marcus Heege" <NO****@heege.net> wrote in message
news:OK**************@TK2MSFTNGP12.phx.gbl...
VS.NET has several debug engines for different purposes:
* unmanaged debugging
* managed debugging
* script (classic ASP) debugging
* ...

Your NET project by default uses the managed debugging engine. Therefore,
breakpoints in unmanaged code will not be hit.
You can change this via the debug project settings. If you choose mixed, the managed and the unmanaged debugging engines will be started, however this is very slow. If you choose native, you cannot set breakpoints in managed code, but in unmanaged code. I usually prefer this option, since it is much
faster.

Marcus


"Gary James" <ga***@iotech.com> wrote in message
news:es**************@tk2msftngp13.phx.gbl...
I've inherited a COM dll project that was switched from the VS6
environment
to VS.Net. I thought I could debug the COM dll code by adding a VB.Net
project to the solution, but when I set breakpoints in the dll, the code
in
the VB test program just passes over them. I'm guessing that it has
something to do with the VB project referencing the dll interop layer,
rather than the dll itself.

Is it possible to do what I'm trying to do? Anyone have any suggestions?
Thanks,

Gary ...



Nov 17 '05 #3

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

Similar topics

8
by: Davy | last post by:
Hi all, I use VC and gcc/gdb to compile and debug C/C++ files. But I found some of the debug version of the compiled files are too large to be run in a small RAM. Can I compile C/C++ Debug...
4
by: emma middlebrook | last post by:
I have a question regarding asserting ... here's some code: string GetAssertMessage() { ... prepare a message string and return it... } void SomeMethod() { ...
7
by: Srinivasa Rao | last post by:
I have read in one article that when we compile the application in release mode, all the debug classes and properties will be automatically removed from the code. I tried to implement this thing by...
9
by: dee | last post by:
Hi I'm about to upload my site and I have switched to release version. Is that enough or do I still need to disable <compilation defaultLanguage="vb" debug="true" /> the debug="true" in the .pdb...
6
by: swartzbill2000 | last post by:
Hello, I have a VB 2005 Express project with a TraceListener-derived class to route Debug.Print output to a log file. It works fine for Debug builds. What is the correct combination of changes to...
6
by: pauldepstein | last post by:
To help me debug, I am writing a lot of information into a stream which I call debug. However, because of the large amount of time taken to print this information, I only want this printed while...
6
by: Andrew Rowley | last post by:
I am having trouble getting debug and release builds to work properly with project references using C++ .NET and Visual Studio 2003. I created a test solution, with a basic Windows form C++...
0
by: BA | last post by:
I posted on this once before and could not get a solution, I am hoping someone can help. I have a very strange code debug behavior that I cannot make heads or tails of: I have c# code being...
1
by: gfergo | last post by:
Good Morning, I seem to be having a problem. I thought I could display detailed debugging information (including file name and line number) on a page using two different methods: 1.)...
3
by: rorni | last post by:
Hi, I'm porting code from Windows to HP-UX 11, compiling with g++. I'm getting a compilation error on the system's debug.h include file, which is included very indirectly through a series of...
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
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.