Solved

How debug ActiveX komponents?

Posted on 2000-04-17
1
242 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
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…

771 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

10 Experts available now in Live!

Get 1:1 Help Now