How do I debug an ActiveX dll from ASP?

Results 1 to 4 of 4

Thread: How do I debug an ActiveX dll from ASP?

  1. #1
    Jim Macdonald Guest

    Default How do I debug an ActiveX dll from ASP?

    Hi,<BR><BR>I have a (VB) ActiveX dll which I can call from VB, C++ and ASP.<BR>I have set breakpoints in the dll.<BR><BR>When I call it from VB or C++ - all works as expected and VB pops up with<BR>the code stopped at the breakpoint - fine.<BR><BR>But when I call it from ASP, the dll code works but it does not stop on any<BR>of the breakpoints.<BR><BR>Anyone else had this problem? Any ideas?<BR><BR>Thanks in anticipation,<BR>Jim.<BR>

  2. #2
    SPG Guest

    Default How I handle it...

    I debug my components by defining an error handler ("on error goto errorCode") which sets a flag ("public property get/let lastError") which I can pick up from ASP. It also works on unintentional errors...<BR><BR>public function foo() as boolean<BR> on error goto errorCode<BR> dim bStateVariable as boolean<BR> &#039 Here&#039s the break!<BR> err.raise 500, , bStateVariable<BR> foo = bStateVariable<BR>exit function<BR>errorCode:<BR> lastError = "foo -&#062; " & err.description<BR> foo = false<BR>end function<BR><BR>&#039 My errors -- note that they actually que up <BR>&#039 as opposed to just giving the last one.<BR>private property let lastError(byVal strIn as string)<BR> strLastError = strLastError & "&#060;p class=error&#062;" & strIn & "&#060;/p&#062;" & vbCrLf<BR>end property<BR><BR>public property get lastError() as string<BR> lastError = strLastError<BR>end property<BR><BR>-- ASP Code --<BR> set foo = server.createObject("Foo.Bar")<BR> if not then response.write foo.lastError<BR> ...<BR><BR>Hope you&#039re enlightened. <BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: How do I debug an ActiveX dll from ASP?

    If you have your develop machine set up as a web server, you can have an instance of your dll running in an open VB app (with break points set) and then call your ASP page and it will hit that instance and stop at your first break point. Otherwise, you&#039d have to set up VB on your web server or go with the other reply&#039s method.<BR><BR>Good luck.

  4. #4
    Join Date
    Dec 1969

    Default RE: How do I debug an ActiveX dll from ASP?

    I assume you&#039re using VB 6. If so, add another project to your dll project (File &#124 Add Project), make it a Stadard EXE. Right click on it in the project explorer window and choose "Set as Start-up". Write a simple client app in VB in this second project. You&#039ll need to set a reference to your dll in this second project&#039s "References". Then set a breakpoint in the client app and fire it off. When it calls your dll the IDE will step through your dll code. <BR><BR>Good luck.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts