Solved

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

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
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 …

820 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