If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Debugging ASP Pages

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-02-04, 10:46
axapta axapta is offline
Registered User
 
Join Date: Apr 2004
Posts: 47
Debugging ASP Pages

Hi Group,
How can I debug ASP Pages within Visual InterDev. I inherited ASP Pages not a Project.

Kind Regards
Reply With Quote
  #2 (permalink)  
Old 08-02-04, 11:12
DMWCincy DMWCincy is offline
Registered User
 
Join Date: May 2004
Posts: 125
One method I use is to do alot of response.writes of the variables and place response.end where I would place a break. Takes alot more time since you will have to rerun the page if you want to change where you stop the execution but I found it a lot better then turning on debug mode on the server and going that route with ASP.
Reply With Quote
  #3 (permalink)  
Old 08-03-04, 02:21
Seppuku Seppuku is offline
Useless...
 
Join Date: Jul 2003
Location: SoCal
Posts: 721
Right.. I've been doing this for 5 years, and I find Response.Write the quickest way to debug my code...

I'll commonly make a global variable called bDEBUG, and set it to false... then around my debug Response.Write statements, I put an IF statement. If bDEBUG is True, then it does my Response.Write.. this way I can turn it on and off without having to add and remove those lines every time.

Just an idea...
__________________
That which does not kill me postpones the inevitable.
Reply With Quote
  #4 (permalink)  
Old 08-03-04, 13:27
DBA_Rahul DBA_Rahul is offline
Registered User
 
Join Date: May 2004
Location: bangalore
Posts: 270
Response.write n response.end are the best way to debug the ASP page
__________________
Reply With Quote
  #5 (permalink)  
Old 08-03-04, 13:28
DBA_Rahul DBA_Rahul is offline
Registered User
 
Join Date: May 2004
Location: bangalore
Posts: 270
Response.write n response.end are the best way to debug the ASP page. I'm using this write from my programming daz.
__________________
Reply With Quote
  #6 (permalink)  
Old 08-04-04, 02:14
Bullschmidt Bullschmidt is offline
Guru
 
Join Date: Jun 2003
Location: USA
Posts: 1,032
Yes Response.Write's are a good way to do some debugging to see if variables or recordset fields really contain the information you think they should.

For example in a login page where the user's access level is assigned to a session variable one could do something like the following:
Response.Write objRST("UserName") & "<br>"
Response.Write objRST("UserPassword") & "<br>"
Response.Write objRST("UserAccess") & "<br>"
Response.Flush
Response.End

The second of the last line above is often required if buffering is set on (Response.Buffer = True) which it perhaps usually would be.
The last line above is optional for if you need to stop the code from running after that point (i.e. to avoid a page redirect or something).
__________________
J. Paul Schmidt, Freelance Web and Database Developer
www.Bullschmidt.com
Access Database Sample, Web Database Sample, ASP Design Tips
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On