×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Trigger Foxpro debugger to open on windows 10 with ASP webpage

Trigger Foxpro debugger to open on windows 10 with ASP webpage

Trigger Foxpro debugger to open on windows 10 with ASP webpage

(OP)
Hi Folks,
For development purposes, we have a setup to trigger the foxpro debugger to pop up when testing our web pages.
This works just fine on Windows 7, but with windows 10, I can see the new vfp 9 instance inside the task manager, but the debugger display doesn't pop up on the screen to help point me to where the error is.

oVfp = CREATEOBJECT("VisualFoxPro.Application.9")
ovfp.docmd("_screen.WindowState = 1")
ovfp.docmd("_screen.visible = .t.")
ovfp.top = 0

&& to trigger the debugger
cStr = "2"
IF cStr = 2 && << This will trigger the debugger to pop up
cStr = "3"
ENDIF

ovfp.quit()
RELEASE ovfp

If I run this directly inside VFP9, it works fine, but if I call the .FXP (let's call it test_screen.fxp) from my .ASP web page (see below), the vfp9.exe shows up in task manager, but lingers there and the the web page just spins until it times out.

This is what the .ASP looks like:
<%@ LANGUAGE="VBSCRIPT"%>

<%
Set lo = Server.CreateObject("aspfox.aspfox")
Response.Write( lo.runFXP("test_screen","C:\inetpub\wwwroot\testsite\",server,application,session,request,response))
Set lo = Nothing
%>

I'm unsure how to trace the vfp9 and see what it's doing and where it's hung up on. I've tried disabling UAC, increased permissions, set vfp9 to run as administrator, and disabled windows defender, but I cannot seem to figure out what on Windows 10 is keeping the debugger from popping up on my screen.

I appreciate any insights.

Thank you,
David

RE: Trigger Foxpro debugger to open on windows 10 with ASP webpage

When cStTR="2" sets this variable to a string, then IF cSTr=2 triggers an error exception for a type mismatch error, but not the debugger, so what is ON('ERROR') at that moment?

Also, the VFP screen is never modal, so as far as I see it you briefly show a VFP IDE and immediately quit it, unless an error halts execution. In general, an error doesn't halt execution, though. Without specific error handling you only get a messagebox that temporarily halts execution until you click OK and then continues, nothing fires up the debugger unless you SUSPEND. And, of course, that SUSPEND never should be part of normal code, but of an error handling routine you specify to react to error exceptions by telling what should be called ON ERROR yourerrorhandling(parameters).

Documentation of AFP should give you that.
Edit: Ah, misread your ASPFOX OLE class with AFP, a web product for using VFP, but that would not be usage in ASP.NET. Sorry. But this ASPFOX class should set error handling to cause the debugger. There must be some technical documentation about how that works, but it's surely never native automatic from VFP to start the debugger by an error exception.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: Trigger Foxpro debugger to open on windows 10 with ASP webpage

Another simpler thought: When all this once worked on another client/server. I guess it has to do with IIS settings or ASP/ASP.NET version?
Rick Strahl has had some posts or sessions on debugging a COM Server in place (within the web application context it's used in. Sp search west-wind.com.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: Trigger Foxpro debugger to open on windows 10 with ASP webpage

(OP)
Thank you Olaf for your insights. I really appreciate your help and your other comments from other topics have been very informative.
I had moved the error handling on the ASPFox class and tried a few things, but no luck.
I am able to get the output of the errors returning and displayed on the webpage, but no luck yet with having the debugger pop up. I may play around with this some more, but I might just accept this as is for now, but it sure makes me want to understand why.
Cheers,
David

RE: Trigger Foxpro debugger to open on windows 10 with ASP webpage

Whatever you rin in ASP or ASP.NET runsd in the IIS Service and that usually has no desktop interaction. That's where everything starts. This isn't just a matter of code to make this work, you're asking IIS to provide interactivity.

See remarks Rick makes on this blogpost - https://weblog.west-wind.com/posts/2007/Oct/15/Deb...:

Quote (Rick Strahl)

There are a couple of requirements for this to work:

IIS must run in SYSTEM context
ASP.NET must run in Full Trust
You have to run DCOMCNFG on VisualFoxPro.Application and set Impersonation to the Interactive User

Similar advice in an older blogpost comment #2 - https://weblog.west-wind.com/posts/2004/Jul/11/Deb...:

Quote (Richard)

...Does nothing. ie does not make VFP visible.

Quote (Rick Strahl)

That's because IIS runs in System context and doesn't have a console to display anything. There are a number of things that need to get set in order for it to work that way. With ASP you need to enable OutofProc COM components and you need to set the W3SVC service to allow interaction with the desktop. Bad idea, BTW.

As I said

Quote (myself)

I guess it has to do with IIS settings

IIS Management console isn't IIS, just like MS SQL Server Managemetn Studio isn't SQL Server, they're both just clients application to the services. And your ASP runs within the context of that service, usually without desktop interaction. I know how you can set up a service with a domain account to have network access and with desktop interaction and both, but it's not recommendable and also not the default. Ricks remarks tell you that this has to be enabled and doesn't work out of the box just by this VFP or ASP side code.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

RE: Trigger Foxpro debugger to open on windows 10 with ASP webpage

(OP)
I finally got it to work by assigning my user to the COM+ and re-registering my dll and checked my permissions of the files. Not as tricky as I originally thought with Windows 10. Thanks.

RE: Trigger Foxpro debugger to open on windows 10 with ASP webpage

Thanks very much for feeding this back in. I never did anything with COM+, at least not in a project, I may once have tried something from the "advanced COM" section.

But good to see the possibility. Way too many are satisfied with an error log, you can learn so much more about the nature of a bug from seeing it "live", even better once you know the reproduction criteria single step towards it to see how it evolves.

It's worth much more struggles to be able to have debugging capabilities.

Bye, Olaf.

Olaf Doschke Software Engineering
https://www.doschke.name

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close