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

x
?
Solved

Debugging converted VB 6.0 to VB.NET COM dlls

Posted on 2009-07-16
3
Medium Priority
?
330 Views
Last Modified: 2013-11-25
I have a VB 6.0 COM dll, that I can open in Visual Studio 6.0. I can set a break point, run it, and debug it.

I recently needed to convert that to a .NET project. It compiles fine, but how do I debug it.
This is what visual studio says......

"A project with an Output Type of Class Library cannot be started directly"
0
Comment
Question by:silentthread2k
[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
  • 2
3 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 24872668
You need to create an application (windows form or console or web or ...) that calls your DLL. Only then your breakpoints will work.
0
 

Author Comment

by:silentthread2k
ID: 24872959
Well, this is a 3rd party tool that calls my dll. How can I do this?
I tried added the 3rd party exe to my solution as a project, and then setting it as a startup project, but I got the message from visual studio...

"Debugging information for "blahblah3rdpartyexe.exe" cannot be found or does not match. No symbols loaded.
0
 

Accepted Solution

by:
silentthread2k earned 0 total points
ID: 24905668
I figure it out. I just have to register my dll from same bin path that Visual Studio creates it in, which is the same path that has the ".pdb"
I needed the .pdb file for debugging purposes.
Any other registration also needs to be done from the same location as the ".pdb" file

After doing all the registration, I set my breakdown.

Then I launched the 3rd party executable. Then I went to my project and selected "Attached to Process" from the debug menu. (You must be in debug mode)

Then I went be to the executable and started doing stuff, and wallah!
When the executable called my dll, it started debugging.

I did not even need to add the 3rd party exe as a project to mysolution. Thank god, that would have been a mission.

I'm glad to know that this can be done. You just kinda have to play with it a bit.
0

Featured Post

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Suggested Courses

730 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