Debugging ASP

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • GriffithsJ

    Debugging ASP

    Hi

    I've just inherited a web site. Someone's just asked me "what database
    table fields are looked at in a particular search?"

    You'd think this would be easy, but I'm looking at an ASP page that when
    printed out is >16 pages and has 20 include files. And no comments. It's
    just a series of scary logic.

    I really need to run this though in "debug mode", seeing what every variable
    is set to at each stage. If this were an ASP page calling a VB COM object
    I'd have no problems, however, I've no idea how to trap this in debug mode
    using standard ASP code. I know the debugger often start up when there's an
    error in the code, but there isn't. So, can anyone enlighten me as to how I
    can step into code using simple ASP (not .Net).

    Many thanks in advance.

    Griff


  • Rob Meade

    #2
    Re: Debugging ASP

    "GriffithsJ " wrote ...
    [color=blue]
    > So, can anyone enlighten me as to how I
    > can step into code using simple ASP (not .Net).[/color]

    I think the majority of people would just use

    Response.Write strVariable

    and maybe to halt the app

    Response.End


    Its a bit of a pain if there are lots of variables - but it shouldn't be too
    hard to locate the database stuff, although thats likely to be a manual read
    of each include to find it I would guess...

    Hope this helps...

    Rob



    Comment

    • Bob Barrows

      #3
      Re: Debugging ASP

      GriffithsJ wrote:[color=blue]
      > Hi
      >
      > I've just inherited a web site. Someone's just asked me "what
      > database table fields are looked at in a particular search?"
      >
      > You'd think this would be easy, but I'm looking at an ASP page that
      > when printed out is >16 pages and has 20 include files. And no
      > comments. It's just a series of scary logic.
      >
      > I really need to run this though in "debug mode", seeing what every
      > variable is set to at each stage. If this were an ASP page calling a
      > VB COM object I'd have no problems, however, I've no idea how to trap
      > this in debug mode using standard ASP code. I know the debugger
      > often start up when there's an error in the code, but there isn't.
      > So, can anyone enlighten me as to how I can step into code using
      > simple ASP (not .Net).
      >
      > Many thanks in advance.
      >
      > Griff[/color]

      For server-side script debugging, you will need to get Visual Interdev. I
      know of no other option, besides liberal use of response.write.

      If you are using SQL Server, you can use SQL Profiler to at least see the
      SQL statements being used.

      Sorry,
      Bob Barrows

      --
      Microsoft MVP -- ASP/ASP.NET
      Please reply to the newsgroup. The email account listed in my From
      header is my spam trap, so I don't check it very often. You will get a
      quicker response by posting to the newsgroup.


      Comment

      • GriffithsJ

        #4
        Re: Debugging ASP

        Great! Slow progress, but getting there...many thanks!


        Comment

        • Jeff Cochran

          #5
          Re: Debugging ASP

          On Mon, 17 Nov 2003 18:53:57 -0000, "GriffithsJ "
          <GriffithsJ_520 @hotmail.com> wrote:
          [color=blue]
          >I've just inherited a web site. Someone's just asked me "what database
          >table fields are looked at in a particular search?"[/color]

          Find the SQL call and Response.Write the SQL statement right before
          it.
          [color=blue]
          >You'd think this would be easy, but I'm looking at an ASP page that when
          >printed out is >16 pages and has 20 include files. And no comments. It's
          >just a series of scary logic.[/color]

          Man, you'd think I wrote it then... :)
          [color=blue]
          >I really need to run this though in "debug mode", seeing what every variable
          >is set to at each stage. If this were an ASP page calling a VB COM object
          >I'd have no problems, however, I've no idea how to trap this in debug mode
          >using standard ASP code. I know the debugger often start up when there's an
          >error in the code, but there isn't. So, can anyone enlighten me as to how I
          >can step into code using simple ASP (not .Net).[/color]

          Visual Interdev is about it I think.

          Jeff

          Comment

          • Tom Kaminski [MVP]

            #6
            Re: Debugging ASP

            "Jeff Cochran" <jcochran.nospa m@naplesgov.com > wrote in message
            news:3fbc2383.1 711491534@msnew s.microsoft.com ...[color=blue]
            > On Mon, 17 Nov 2003 18:53:57 -0000, "GriffithsJ "
            > <GriffithsJ_520 @hotmail.com> wrote:[color=green]
            > >error in the code, but there isn't. So, can anyone enlighten me as to[/color][/color]
            how I[color=blue][color=green]
            > >can step into code using simple ASP (not .Net).[/color]
            >
            > Visual Interdev is about it I think.[/color]

            Start here:
            Microsoft Support is here to help you with Microsoft products. Find how-to articles, videos, and training for Microsoft Copilot, Microsoft 365, Windows 11, Surface, and more.


            --
            Tom Kaminski IIS MVP
            http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS





            Comment

            • Bullschmidt

              #7
              Re: Debugging ASP

              <<
              I've just inherited a web site. Someone's just asked me "what database
              table fields are looked at in a particular search?"[color=blue][color=green]
              >>[/color][/color]

              There might be an area that has something like this:
              strSQL = "SELECT LName, FName, Company FROM MyTable ORDER BY LName,
              FName"

              Best regards,
              J. Paul Schmidt, Freelance ASP Web Developer
              Do you have an idea for a database on the Web? Hi! I'm a freelance Web and/or database developer who can make database information available 'live' on the Web.

              ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...


              *** Sent via Developersdex http://www.developersdex.com ***
              Don't just participate in USENET...get rewarded for it!

              Comment

              Working...