Solved

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

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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 …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

744 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now