[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Debugging multiple VB apps at once

Posted on 2002-03-15
8
Medium Priority
?
315 Views
Last Modified: 2008-01-16
How do I debug more than one debug app at once?

In my main app I have a reference to an active X component.  I would like to debug the Active X (using my source code of course). I tried to set the referece path to the active X's vbp file...but it doesnt like that one bit.  How is this done?



Im stumped. :)

knoxxx
0
Comment
Question by:JohnnyKnoxville
[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
  • 4
  • 4
8 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6869386
1. Open your component.
2. Into the same VB IDE instance, select File->Add Project... and select your second project
3. In the project explorer, right-click the second project and select "Set as start-up"
0
 

Author Comment

by:JohnnyKnoxville
ID: 6871832
When I open my main app....then add the second component to the same instance of the IDE.....I receive an error stating:


Project <path to my project>.vbp cannot be referenced because its project type is EXE.

I can select OK and then I click on the second project in the project explorer and select 'Set as start-up'.  Then I try to run the projects and nothing happens.  

Any Ideas?

knoxxx
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6871865
Open your component FIRST. then your app can be opened and the set as startup must be applied to the EXE (not the component).
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:JohnnyKnoxville
ID: 6874471
Sorry for the confusion but can you clarify even more. :)

Ok....lets say my standard app (my main app) is app1 and my activeX .exe (component) is app2.  Im supposed to open app2....then app1...then set as startup to app2????



Thanks


knoxxx
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 6874494
I was thinking that you were building an ActiveX DLL (in which case the proc I gave you is correct).

For an ActiveX EXE,

1. Open your Component in one instance of VB and press start (or F5)

2. Open your main app into a SECOND instance of VB

3. Set your reference to the component and press start.

You will be able to debug both.
0
 

Author Comment

by:JohnnyKnoxville
ID: 6879037
Well...I opened the component app (active X exe) and started it.....


Then I opened my main app and refereced the vbp of the active X app....


Then I started my main app and set a break point in my active X app and nothin....hmmmmm.  


Am I just stuck in stupid?  or am I missin something else?


thanks a million for all of your help so far. :)


knoxxx
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 200 total points
ID: 6879742
do exactly this and it will work

1. start a new VB instance

2. create a new ACTIVEX EXE project template

3. Add this procedure to the default class that has been created:
Option Explicit

Public Sub MyProc()
    MsgBox "Hello for ActiveX EXE!"
End Sub

4. add a breakpoint on the msgbox line

5. Press F5 (to run it).

6. start a new VB instance

7. create a new STANDARD EXE project template

8. Change your project name (or else you will get an error).

9. add "Project1" to your project references (the location should be set to something like c:\temp\vb7.tmp)

10. add a button to your form

11. add this code:
Option Explicit

Private Sub Command1_Click()
Dim x As Project1.Class1

    Set x = New Project1.Class1
    x.MyProc
End Sub

12. press F5 and click on the button

enjoy debugging!

BTW, it is often much easier to change the project type to ActiveX DLL for the debugging time and reset it to ActiveX EXE when debugging is complete.



0
 

Author Comment

by:JohnnyKnoxville
ID: 6888007
Cool.....Sorry for taking so long to wrap this question up.  Thanks a million!



knoxxx
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses

649 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