Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2011-02-21
4
Medium Priority
?
494 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

670 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