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

Best Way to Debug ASP

Status
Not open for further replies.

mlocurci

MIS
Oct 17, 2001
210
US
I have an error on my ASP page that I need to debug. Whats the best way to do so?
 
1) Response.Write all variables to screen for value
2) Test connections to databases, textfiles
3) comment out sections to perform in a sense a break in the compilation of the script.
for instance if I had these lines
<%
session(&quot;test&quot;) = &quot;this is a test&quot;
dim test
test = session(&quot;test&quot;)

if test = &quot;this is a test&quot; then
response.write &quot;variables value passed!&quot;
end if

'now to test it
session(&quot;test&quot;) = &quot;this is a test&quot;
'response.write session(&quot;test&quot;)

dim test
test = session(&quot;test&quot;)
'response.write test

if test = &quot;this is a test&quot; then
response.write &quot;variables value passed!&quot;
end if

then for connections to db's etc.
write out the sql statements and the connection strings. sometimes you will see a simple error in them that way that you miss easily in a concatinated variable A language that doesn't affect the way you think about programming is not worth knowing.
admin@onpntwebdesigns.com
 
Use Visual Interdev, put a break point on the code you want to stop on and walk through the code. Did I miss the point here?

Cliff
 
I don't have interDev is one problem. Any freeware?
 

The best way to deal with errors is to not create them in the first place. [yoda]

However, I have never met anyone that can write perfect code the first time.

I use the respose.write a lot.
I also will comment out all &quot;extra&quot; code and work on the problem in it's simplest version.

Kris

 
use response.end to end the response stream after you write your variables to the page but before the line that triggers the error. That way you can view you variables and you dont get the error page.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top