473,383 Members | 1,813 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,383 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 2819
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.