Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to debug a VB6 class from within a .Net 2003 project

Posted on 2011-02-21
4
Medium Priority
?
495 Views
Last Modified: 2012-05-11
Hi...

This is the scenario. I have a .Net 2003 project from where I reference a VB6 class which I created. The problem is that I can't find out how to set a breakpoint and debug the class (I am getting an error from the class, and I need to debug it)

The main project runs as a Windows service, and it listens to port 8080 using winsockets... the vb6 class handles methods from a third class

I read in a couple of sites that this debugging method runs naturally when debugging .Net 2005 calling a VB6 class... Have tried to follow the steps described in those documents, but my application hangs

Any help will be appreciated
0
Comment
Question by:JohnP_Realini
  • 3
4 Comments
 
LVL 16

Expert Comment

by:Kalpesh Chhatrala
ID: 34944406
Try this:

1. File | Open Solution, open the .exe file of the VB6 client.
2. Project properties | Configuration Properties | Debugging,
   set Debugger Type to "Managed only".
3. Set breakpoints in the VB.NET assembly's source files and start debugging.

You can also set Debugger Type to Mixed if you want to debug VB6 code too,
but do not set it to Auto or  Native Only - it will disable managed code debugging.

Detailed Article is Here :
http://www.dotnetmonster.com/Uwe/Forum.aspx/vs-net-debugging/1902/Debug-COM-assembly-VB-2003
0
 
LVL 3

Author Comment

by:JohnP_Realini
ID: 34945680
Thanks, but I think my case is the opposite... My application is written in VB.Net 2003, and it calls functions from a VB6 Class... I can't get into the VB6 code while debugging from the main VB.Net 2003 project (which, by the way, runs attached to the Windows Service it created)

Thanks for any help
0
 
LVL 3

Accepted Solution

by:
JohnP_Realini earned 0 total points
ID: 34946127
I found the solution in microsoft support site
http://support.microsoft.com/kb/811658/es

Basically, there are a couple of tweak in the Debugging options in the VB6 class project, and then after debugging the main VB.Net project, I had to open the .cls file created by VB6, and voila! I was able to go through the class' code in debug mode

Thanks anyway
0
 
LVL 3

Author Closing Comment

by:JohnP_Realini
ID: 34986545
I found the solution to my problem in the Microsoft Support site
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
When you discover the power of the R programming language, you are going to wonder how you ever lived without it! Learn why the language merits a place in your programming arsenal.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Progress

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question