Solved

How to debug an ActiveX VB6 DLL faster?

Posted on 2012-03-30
3
367 Views
Last Modified: 2012-04-13
HI

I am developing some DLLs based on VB6 ActiveX and in my short experience on this I feel I can´t debug it quickly as I want.

I do the following:

1. create code.
2. compile it.
3. Register it, and then try it with the final application.
4. If it has errors I go back to the point 1.

I use msgbox to trigger some "errors" and finally get some clue but this is pretty slow process, I wonder if there is a debugging way just like .exe apps.

Thanks.
0
Comment
Question by:dimensionav
[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 17

Accepted Solution

by:
vb_elmar earned 250 total points
ID: 37788224
VB can return the line where the error appeared. You can set a Stop command (see sample below), then VB stops and shows the Sub where the error appeared. In the sample below it's possible to go to the variable "a" (using the mouse cursor) . -VB shows you the value of "a" in a "tooltiptext".

Private Sub Form_Load()
On Error GoTo 12
4: Dim a As Long
6: a = "Hello"
8:
10: GoTo 14
12: MsgBox Erl: Stop
14:
End Sub
0
 
LVL 47

Assisted Solution

by:Martin Liss
Martin Liss earned 250 total points
ID: 37788294
There's an article in VB6 help called 'Creating ActiveX Components' that will lead you step by step through the process including debugging.
0
 
LVL 47

Expert Comment

by:Martin Liss
ID: 37843287
Glad I could help. In my profile you'll find an article I wrote about debugging VB6. It doesn't deal with dll's but you may still find it of interest.

Marty: MVP 2009 - 2012
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

728 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