Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2004
    Posts
    47

    Unanswered: Debugging ASP Pages

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

    Kind Regards

  2. #2
    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.

  3. #3
    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.

  4. #4
    Join Date
    May 2004
    Location
    bangalore
    Posts
    270
    Response.write n response.end are the best way to debug the ASP page

  5. #5
    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.

  6. #6
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •