?
Solved

How debug ActiveX komponents?

Posted on 2000-04-17
1
Medium Priority
?
257 Views
Last Modified: 2013-11-25
How can I debug ActiveX komponents in VB6.
0
Comment
Question by:mikibenek
[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
1 Comment
 
LVL 2

Accepted Solution

by:
brice123 earned 150 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
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…
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…
Suggested Courses

752 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