views:

687

answers:

4

I've used to put a "stop" statement in my VBScript/ASP-Classic code to break into debugger (Microsoft Script Editor, that comes with Microsoft Office).

But now it isn't breaking anymore. The "stop" is ignored and nothing happpens.

The server-side debugging flag is already enabled in IIS

How to solve this?


Sample Code, hello.asp

stop 
Response.Write "Hello W."
+1  A: 

Are you running VBScript in an Office app? Wouldn't that be VBA?

For VBScript debugging you need to enable that with the /d switch on with wscript or cscript when running the vbs file:-

 wscript /d c:\myfolder\myscript.vbs

Edit: Did I miss the ASP-Classic bit?

In this case you have turned off debugging in the application configuration. In IIS6 open properties on the ASP application, select Home Directory tab, click "Configuration..." in the Application Settings section. Select the Debugging tab, select the debugging flags.

AnthonyWJones
You are right... But actually I'm runnig it from a ASP page. Any ideas?
Daniel Silveira
Those flags are all set in IIS.
Daniel Silveira
Check your event log, do you see any errors?
AnthonyWJones
Actually there is... "Error: The Template Persistent Cache initialization failed for Application Pool 'DefaultAppPool' because of the following error: Could not create a Disk Cache Sub-directory for the Application Pool. The data may have additional error codes.."
Daniel Silveira
See More info section of this KB: http://support.microsoft.com/kb/332097
AnthonyWJones
I've follow those instructions, the message in event log stopped, but the debugger didn't started... :(
Daniel Silveira
Are you getting the Response.Write output or is the page not working?What happens if you deliberately include an error such as a divide by zero>
AnthonyWJones
The stop is simple ignored... the rest of the script works normaly. If I put a "divide by zero" error I get "Microsoft VBScript runtime error"
Daniel Silveira
Check the registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug what are the Auto and Debugger settings? Can you think of what conditions have changed from when it was working? Has there been IISRESET or even a Re-boot since the problem arose?
AnthonyWJones
+1  A: 

Try this instead of Stop:

Dim I
I = 1 / 0
Joel Spolsky
A: 

It may be a problem with the Registry - See http://support.microsoft.com/kb/252895

Katy
A: 

Thanks Katy 4 the link.

in my registry JITDebug was magically set to 0. I changed it to 1 and now I can debug my classic asp sites again. thanks a lot.

but I am very mad at microsoft. i use vista and studio 2008 and still this old bug ocurrs. nobody at ms seems to care.

regards.

Steven