Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to debug an ActiveX VB6 DLL faster?

Posted on 2012-03-30
3
Medium Priority
?
377 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
  • 2
3 Comments
 
LVL 17

Accepted Solution

by:
vb_elmar earned 1000 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 49

Assisted Solution

by:Martin Liss
Martin Liss earned 1000 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 49

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

972 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