Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Debugging VB COM object from ASP 1

Status
Not open for further replies.

xterra

Programmer
Apr 5, 2001
71
US
I am calling an Object that I have written in VB and compiled into a DLL. Is there any way that I can step through the code in Interdev, then when it hits the COM method, step over to VB and debug the component, then come back to Interdev?

Thanks,

Adam
 
The current visual interdev 6 will only allow you to step through your asp code and will not for example launch vb's debugger, step through that and then go back to asp. .NET can do that.

Many problems of this type are related to the fact that asp passes variant datatypes, so if your com dll is not setup to receive a variant, you should cast the type with a "c" conversion function.
Example
asp calls a method in your com dll.

com function is declared like
public function Test(strPassed as string)

Your asp code should call the code like:

obj.Test(cstr("passing me"))

same goes for "long" etc.

In short, check how your functions are declared and keep in mind that asp always passes variant data types.

Your best bet would be to use asp debugging and then if you suspect the problem is still in your com dll, then write a simple "test" program that calls the methods in your com dll. Gilbert M. Vanegas
Programmer Analyst III
County of San Bernardino - ISD
Email : gvanegas@isd.sbcounty.gov
 
If you run the dll project in vb and set a break point, then when you asp page calls the dll you will be able to step into it.
 
I tried to set a break point, but it doesn't work. It just runs like it normally would. I found my problem, it was similar to what v0520 said about the variants. In case this happens again in some other instance it would be so much easier just to step over to VB and look at my values. I guess I will just have to upgrade my skills to the .Net framework. Thank you all.

Adam
 
Yes, I think I remember what cbokowski said about the breakpoint. I had forgotten about that. That is a good point, I think that DOES work. I will have to try that next time I need to do something like that. Thanks... Gilbert M. Vanegas
Programmer Analyst III
County of San Bernardino - ISD
Email : gvanegas@isd.sbcounty.gov
 
You will also have to Copy The Web Project from the server locally on your machine, as LocalHost, for you to use this method.


Codefish
 
What cbokowski would work and the reason it might not work could be when you do not include your ASP pages in a project. Uhgar
-- Alcohol and Calculus never mix! Do not drink and derive! --
 
I did a quick test without compiling the dll, just running it in debug mode and was able to step right into the code.

BTW I am running my vid projects in local mode. So this combination works for me.

 
Ok so If I run it in Local mode, and run my VB object without compiling you can step into it?

Thanks,

Adam
 
I would still run it in the Master mode.
Compile your VB DLL (Ctrl-f5) and run it. Keep a break point in one of your classes or whereever you feel a bkpt is needed...voila! I think you should have it! Uhgar
-- Alcohol and Calculus never mix! Do not drink and derive! --
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top