Solved

How debug ActiveX komponents?

Posted on 2000-04-17
1
243 Views
Last Modified: 2013-11-25
How can I debug ActiveX komponents in VB6.
0
Comment
Question by:mikibenek
1 Comment
 
LVL 2

Accepted Solution

by:
brice123 earned 50 total points
ID: 2725488
To debug an out-of-process component (ActiveX EXE)

1. Set breakpoints and watch expressions as needed in your class module code.

2. Run the component project by pressing CTRL+F5 or clicking Start With Full Compile on the Run menu.
The component will compile, but Sub Main will not run until the first object is created in response to a client request.

3. Start a second instance of Visual Basic, and open your test project. Set breakpoints and watch expressions as needed.

4. Run the test project. When a breakpoint is encountered in the component code, the component project receives focus.

Note  
When an out-of-process component enters break mode, focus may not immediately switch to the component project. If you click anywhere on the client, the Component Busy dialog box will be displayed. Click Switch To button to give the focus to the component project.

When you’re finished with the debugging session, close your test project before stopping the component.
Important   If you stop the component project before closing your test project, all of the objects the component was providing will be destroyed. Your test project may get errors when you try to close it.

To debug an in-process component (ActiveX DLL and controls)

1. Set breakpoints and watch expressions as needed in your class module or UserControl code.

2. Run the project group by pressing CTRL+F5 or clicking Start With Full Compile on the Run menu.
The in-process component will compile, but Sub Main will not run until the first object is created in response to a client request.

3. While debugging, you can step from the test project directly into code in the component project.

4. When you’re finished with the debugging session, click the Close button on test project’s main window to return to design mode.

Important  
Closing the test project by clicking the End button will cause all projects to close. Objects in the component will not receive Terminate events. Shutting down in this fashion will not correctly test the shutdown behavior of your component.

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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…
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…

861 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

25 Experts available now in Live!

Get 1:1 Help Now