Solved

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

Posted on 2011-02-21
4
488 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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …

832 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