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

Debug (ASP)

Status
Not open for further replies.

kennedymr2

Programmer
May 23, 2001
594
AU
I am trying to debug some .asp files.
Have set up a test asp page roughly as follows

<HTML>
<center>
<h2> <% Response.Write "assasaasssa" %> <h2>
</centre>
</HTML>

<%
dim Test1,Test2

Test1=77777
Test2=88888

'etc.............
%>

If i run the above script, and it has no errors in it
the html displays ok.
But if i introduce an error eg. take out the ' from 'etc
the script bombs out, and i do not get the html

I was hoping i could use html to display variables during the script processing, in order to debug what was going wrong.

Have installed the microsoft script debugger,but it does not see to work ????
Have tried the visual studio debugger, cannot get it work as well.!

?? How do i debug an asp script.????, in a practical way.

Appreciate any assistance offered.



 
i dont think you can use HTML to debug Asp script.

ASP is a server side technology...whatever is in between <% and %> is executed on the server

-VJ



 
to debug ASP, or to see the output from a script simply use

response.write variable

to see the full error message (in IE) use
Tools -> Internet Options -> Advanced -> Uncheck "Show friendly HTTP error messages"

and if a script is "bombing out" use the same technique to show values above the error line.



Chris.

Indifference will be the downfall of mankind, but who cares?
A website that proves the cobblers kids adage.
Nightclub counting systems

So long, and thanks for all the fish.
 
Also, if you are using Visual InterDev, you might try forum117 for additional ideas on how to debug ASP using that tool.

------------------------------------------------------------------------------------------------------------------------
"The major difference between a thing that might go wrong and a thing that cannot possibly go wrong is that when a thing that cannot possibly go wrong goes wrong it usually turns out to be impossible to get at or repair."
--Dou
 
Thankyou very much for the help offered., and the likks to the problem.

It looks like this debug thing is a bit of a problem.!

Will investigate all the sujjestions.

Thanks again

regards kennedymr2
 
If you are running this script using IIS, and the IIS is running localy you can go in to the IIS Snap-in and change the debugging options.

Its in the "home directory" tab of the website properties, under application settings go to debugging and select server-side.

Next in your asp script somewhere within the <% and %> you need to put in STOP.
Code:
<% 
  ....code...
  STOP
  ...more code...
%>
[/stop]
the STOP will create a breakpoint.
 
another item is you could turn response.buffer = true and response.flush every so often thru the page, that way you get as much of the page up til the error/last flush instead of a few tid bits of html from before the code and then the error which might be right near the end.

[thumbsup2]DreX
aKa - Robert
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top