Solved

Debugging converted VB 6.0 to VB.NET COM dlls

Posted on 2009-07-16
3
300 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
  • 2
3 Comments
 
LVL 69

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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.
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

747 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

13 Experts available now in Live!

Get 1:1 Help Now