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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Debugging problem

Status
Not open for further replies.

EnemyGateIsDown

Technical User
Oct 3, 2002
235
GB
Hi guys,

I am currently trying to debug an asp script, however the script in question doesnt create a page and so all that happens is that the operation fails with no indication as to why.

The file is mostly vbscript and I am certain that the problem lies there. Does anyone know how I can uncover the error that is stopping the code from completing?

Any help is as always greately appreciated.

Cheers,

Chris
 
Chris, can you create a fileSystemObject, and then add lines in your code to report where you are, and what state the variables are in?

K
 
i think you can trap the errors...something like this...

on error resume next.

....

...

if err.number>0 then
response.write err.description
end if

-DNG
 
And the most basic of all methods: response.write "Got here" inserted into various places in the code so that you can step by step determine how far the code executes before failing. You can even write out your values as you go so you can determine how the logic is flowing.

Just because the page does not normally generate anything visual does not mean you cannot throw things in temporarily to determine where your problems crop up.


Paranoid? ME?? WHO WANTS TO KNOW????
 
Sometimes you will get nothing when the ASP hits an error before anything else has been written to the response object.

When this happens to me, i find it useful to put a response.write or even some plain html at the very top of my script... you can remove it later after you fix the problem.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top