How can i view Debug.Write?

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

    #31
    Re: How can i view Debug.Write?

    > I use a SQL table to trace and store expression evals[color=blue]
    > during development of complex functions for a site. I have
    > subroutines setup to generate appends to the table. I know
    > waiting for the page to download from the server can sometimes
    > take a long time.[/color]

    i tried creating a COM Object that only calls OutputDebugStri ng, but for
    some reason the console session on the Windows Server machine cannot see the
    output debug strings generated from the IWAM session.


    Comment

    • Bob Barrows [MVP]

      #32
      Re: How can i view Debug.Write?

      Ian Boyd wrote:[color=blue][color=green]
      >> To avoid "breaking things", write the values into hidden fields, or
      >> into divs whose css display property is set to none:
      >>
      >> response.write "<div id=""debug"" style=""display :none"">"
      >> response.write "debugging information"
      >> response.write "</div>"[/color]
      >
      > Assuming that at the time the DIV happens to come down we are inside
      > the HTML body, the xhtml body, or that we are in HTML at all.
      > Or that the reponse output isn't buffered, and a the response hasn't
      > been cleared.
      > Or that the browser hasn't subsequently been sent a redirect and so
      > there is no longer any source to see.[/color]

      Good points. Although these can be mitigated by using Response.Flush
      where appropriate, or logging to a server-side text file (a technique I
      use quite often) where not appropriate.
      [color=blue]
      >[color=green]
      >> 4. vbscript debugger class -
      >> http://support.microsoft.com/kb/299986/EN-US/[/color]
      >
      > i don't understand what this is doing. Is it just really obfuscated
      > Response.Write' s?[/color]

      Pretty much. I posted it under the assumption that you were still unable
      to get the debugger working.

      --
      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

      • Michael Kujawa

        #33
        Re: How can i view Debug.Write?

        I suppose, even though it maybe possible
        to use the debug console in a limited way, my guess
        is you are finding out that asp really is best debugged
        by response.writes or db appends during the process.

        It seems at least according to this thread that using the
        debug console is a hassle and not really reliable. Maybe
        that is why not to many even thought it was possible.

        I am sure if it was practical to use it, this group or google
        archives would be filled with posts saying to use it.



        "Ian Boyd" <ian.msnews010@ avatopia.com> wrote in message
        news:OVrijJkiGH A.4580@TK2MSFTN GP05.phx.gbl...[color=blue][color=green]
        >> I use a SQL table to trace and store expression evals
        >> during development of complex functions for a site. I have
        >> subroutines setup to generate appends to the table. I know
        >> waiting for the page to download from the server can sometimes
        >> take a long time.[/color]
        >
        > i tried creating a COM Object that only calls OutputDebugStri ng, but for
        > some reason the console session on the Windows Server machine cannot see
        > the output debug strings generated from the IWAM session.
        >[/color]


        Comment

        • Anthony Jones

          #34
          Re: How can i view Debug.Write?


          "Michael Kujawa" <nof at kujawas dot net> wrote in message
          news:%23VXUWrpi GHA.4580@TK2MSF TNGP05.phx.gbl. ..[color=blue]
          > I suppose, even though it maybe possible
          > to use the debug console in a limited way, my guess
          > is you are finding out that asp really is best debugged
          > by response.writes or db appends during the process.
          >
          > It seems at least according to this thread that using the
          > debug console is a hassle and not really reliable. Maybe
          > that is why not to many even thought it was possible.
          >
          > I am sure if it was practical to use it, this group or google
          > archives would be filled with posts saying to use it.
          >[/color]

          That's right. I would be one of them. In my view if you're a serious
          developer then you need serious tools. Response.Write can be useful and for
          some hosted and production situations you're only choice. However for
          general development and debugging nothing matches VS running on a local
          machine against a local development version of the site.

          [color=blue]
          >
          >
          > "Ian Boyd" <ian.msnews010@ avatopia.com> wrote in message
          > news:OVrijJkiGH A.4580@TK2MSFTN GP05.phx.gbl...[color=green][color=darkred]
          > >> I use a SQL table to trace and store expression evals
          > >> during development of complex functions for a site. I have
          > >> subroutines setup to generate appends to the table. I know
          > >> waiting for the page to download from the server can sometimes
          > >> take a long time.[/color]
          > >
          > > i tried creating a COM Object that only calls OutputDebugStri ng, but for
          > > some reason the console session on the Windows Server machine cannot see
          > > the output debug strings generated from the IWAM session.
          > >[/color]
          >
          >[/color]


          Comment

          • Michael Kujawa

            #35
            Re: How can i view Debug.Write?


            "Anthony Jones" <Ant@yadayadaya da.com> wrote in message
            news:e3k9GCtiGH A.4056@TK2MSFTN GP02.phx.gbl...[color=blue]
            >
            > That's right. I would be one of them. In my view if you're a serious
            > developer then you need serious tools. Response.Write can be useful and[/color]
            for[color=blue]
            > some hosted and production situations you're only choice. However for
            > general development and debugging nothing matches VS running on a local
            > machine against a local development version of the site.
            >
            >[/color]

            True,

            VS I suppose maybe be best. But I have never used it.
            I myself have never used anything but notepad for includes
            and DW / NOF for layout, local IIS / SQL for testing.

            Although, I am considering biting the bullet and purchasing a
            copy of VS. I have some very complex projects coming up
            and VS may be right for those projects. Hopefully there
            is not a long learning or unlearning curve?



            Comment

            • Bob Barrows [MVP]

              #36
              Re: How can i view Debug.Write?

              Michael Kujawa wrote:[color=blue]
              > "Anthony Jones" <Ant@yadayadaya da.com> wrote in message
              > news:e3k9GCtiGH A.4056@TK2MSFTN GP02.phx.gbl...[color=green]
              >>
              >> That's right. I would be one of them. In my view if you're a
              >> serious developer then you need serious tools. Response.Write can
              >> be useful and for some hosted and production situations you're only
              >> choice. However for general development and debugging nothing
              >> matches VS running on a local machine against a local development
              >> version of the site.
              >>
              >>[/color]
              >
              > True,
              >
              > VS I suppose maybe be best. But I have never used it.
              > I myself have never used anything but notepad for includes
              > and DW / NOF for layout, local IIS / SQL for testing.
              >
              > Although, I am considering biting the bullet and purchasing a
              > copy of VS. I have some very complex projects coming up
              > and VS may be right for those projects. Hopefully there
              > is not a long learning or unlearning curve?[/color]

              No. you'll find yourself wondering how you ever did without it.

              --
              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

              • Mike Brind

                #37
                Re: How can i view Debug.Write?


                Bob Barrows [MVP] wrote:[color=blue]
                > Michael Kujawa wrote:[color=green]
                > > "Anthony Jones" <Ant@yadayadaya da.com> wrote in message
                > > news:e3k9GCtiGH A.4056@TK2MSFTN GP02.phx.gbl...[color=darkred]
                > >>
                > >> That's right. I would be one of them. In my view if you're a
                > >> serious developer then you need serious tools. Response.Write can
                > >> be useful and for some hosted and production situations you're only
                > >> choice. However for general development and debugging nothing
                > >> matches VS running on a local machine against a local development
                > >> version of the site.
                > >>
                > >>[/color]
                > >
                > > True,
                > >
                > > VS I suppose maybe be best. But I have never used it.
                > > I myself have never used anything but notepad for includes
                > > and DW / NOF for layout, local IIS / SQL for testing.
                > >
                > > Although, I am considering biting the bullet and purchasing a
                > > copy of VS. I have some very complex projects coming up
                > > and VS may be right for those projects. Hopefully there
                > > is not a long learning or unlearning curve?[/color]
                >
                > No. you'll find yourself wondering how you ever did without it.
                >[/color]

                Bob, or Anthony (or anyone who primarily uses VS) - could you explain
                the main features of VS that you find indispensible in classic ASP
                development?

                Thanks

                --
                Mike Brind

                Comment

                • Anthony Jones

                  #38
                  Re: How can i view Debug.Write?


                  "Mike Brind" <paxtonend@hotm ail.com> wrote in message
                  news:1149840503 .672951.273760@ y43g2000cwc.goo glegroups.com.. .[color=blue]
                  >
                  > Bob Barrows [MVP] wrote:[color=green]
                  > > Michael Kujawa wrote:[color=darkred]
                  > > > "Anthony Jones" <Ant@yadayadaya da.com> wrote in message
                  > > > news:e3k9GCtiGH A.4056@TK2MSFTN GP02.phx.gbl...
                  > > >>
                  > > >> That's right. I would be one of them. In my view if you're a
                  > > >> serious developer then you need serious tools. Response.Write can
                  > > >> be useful and for some hosted and production situations you're only
                  > > >> choice. However for general development and debugging nothing
                  > > >> matches VS running on a local machine against a local development
                  > > >> version of the site.
                  > > >>
                  > > >>
                  > > >
                  > > > True,
                  > > >
                  > > > VS I suppose maybe be best. But I have never used it.
                  > > > I myself have never used anything but notepad for includes
                  > > > and DW / NOF for layout, local IIS / SQL for testing.
                  > > >
                  > > > Although, I am considering biting the bullet and purchasing a
                  > > > copy of VS. I have some very complex projects coming up
                  > > > and VS may be right for those projects. Hopefully there
                  > > > is not a long learning or unlearning curve?[/color]
                  > >
                  > > No. you'll find yourself wondering how you ever did without it.
                  > >[/color]
                  >
                  > Bob, or Anthony (or anyone who primarily uses VS) - could you explain
                  > the main features of VS that you find indispensible in classic ASP
                  > development?
                  >[/color]

                  First and fore most the ability to step the code line by line to see exactly
                  what is going on.

                  Being able to examine the state of variables as they change and the ability
                  to modify them. The problem with a Response.Write approach is that it's
                  still a trial and error approach. By having the code stepped in a debugger
                  you can see when for example a piece of SQL is built incorrectly and why.
                  You can then correct that SQL and continue stepping. In this way a single
                  run through the code can reveal multiple errors in detail in one pass.

                  Also being able to set break points on not just a line but also the state of
                  a variable. If I have a large loop that errors only when a variable has a
                  certain value I can set up a break for that condition then step to see why
                  things are going pear shaped.

                  Another window I find invaluable is the call stack window. Very often a
                  problem in code is due to logic problem above the function where the error
                  occurred. The ability to see how the code arrived at certain point and
                  being able examine the contents of all the local variables in each of the
                  calling procedures is also very useful.





                  [color=blue]
                  > Thanks
                  >
                  > --
                  > Mike Brind
                  >[/color]


                  Comment

                  • Bob Barrows [MVP]

                    #39
                    Re: How can i view Debug.Write?

                    Mike Brind wrote:[color=blue][color=green]
                    >>
                    >> No. you'll find yourself wondering how you ever did without it.
                    >>[/color]
                    >
                    > Bob, or Anthony (or anyone who primarily uses VS) - could you explain
                    > the main features of VS that you find indispensible in classic ASP
                    > development?
                    >[/color]

                    Anthony extolled on the virtues of the debugger (which frankly, I rarely use
                    for server-side code because it rarely works on my development server, which
                    my workplace requires me to use - when I do need to use it, I have to copy
                    my project to my personal machine, debug it and make corrections to the code
                    on the development server - very unwieldy, so I mainly use the
                    response.write approach).

                    I've used both Notepad and VS for development. Having used VS, I will never
                    go back to Notepad by choice. The reasons?
                    1. Integration with the MSDN library and Platform SDK for context-sensitive
                    help
                    2. Intellisense - yes there are times it gets in the way, but I'm constantly
                    using ctrl-space to autocomplete words
                    3. Color-coding of statements: comments are green, <% have yellow
                    background, string literals are maroon ...
                    5. Right-click -> View in browser
                    6. Solution Explorer - having a solution containing all the projects
                    (websites) that I will need to work on in one place. For example, I will
                    typically have a solution containing the development, QA and production
                    versions of a site, making deployment very simple.
                    7. Integrated source control

                    There's more but i need to move on.


                    --
                    Microsoft MVP - ASP/ASP.NET
                    Please reply to the newsgroup. This email account is my spam trap so I
                    don't check it very often. If you must reply off-line, then remove the
                    "NO SPAM"


                    Comment

                    • Mike Brind

                      #40
                      Re: How can i view Debug.Write?


                      Bob Barrows [MVP] wrote:[color=blue]
                      > Mike Brind wrote:[color=green][color=darkred]
                      > >>
                      > >> No. you'll find yourself wondering how you ever did without it.
                      > >>[/color]
                      > >
                      > > Bob, or Anthony (or anyone who primarily uses VS) - could you explain
                      > > the main features of VS that you find indispensible in classic ASP
                      > > development?
                      > >[/color]
                      >
                      > Anthony extolled on the virtues of the debugger (which frankly, I rarely use
                      > for server-side code because it rarely works on my development server, which
                      > my workplace requires me to use - when I do need to use it, I have to copy
                      > my project to my personal machine, debug it and make corrections to the code
                      > on the development server - very unwieldy, so I mainly use the
                      > response.write approach).
                      >
                      > I've used both Notepad and VS for development. Having used VS, I will never
                      > go back to Notepad by choice. The reasons?
                      > 1. Integration with the MSDN library and Platform SDK for context-sensitive
                      > help
                      > 2. Intellisense - yes there are times it gets in the way, but I'm constantly
                      > using ctrl-space to autocomplete words
                      > 3. Color-coding of statements: comments are green, <% have yellow
                      > background, string literals are maroon ...
                      > 5. Right-click -> View in browser
                      > 6. Solution Explorer - having a solution containing all the projects
                      > (websites) that I will need to work on in one place. For example, I will
                      > typically have a solution containing the development, QA and production
                      > versions of a site, making deployment very simple.
                      > 7. Integrated source control
                      >
                      > There's more but i need to move on.
                      >[/color]

                      I was trying to work out if there is any reason I should be looking to
                      switch from Dreamweaver 8. At the moment there is nothing compelling
                      in the list you have provided. They are all good features, but DW
                      offers most of them:

                      Intellisense - to a lesser degree
                      Colour coding
                      Solution Explorer (Site Manager)
                      Source Control (which as a single developer I don't use)

                      but it also has some other very good features:

                      Support for PHP files (which I use sometimes)
                      A great CSS feature where the styles you define are displayed (with
                      styling) in a drop down list for application to elements
                      The html contents of include files are displayed in Design View.
                      .....

                      --
                      Mike Brind

                      Comment

                      • Anthony Jones

                        #41
                        Re: How can i view Debug.Write?


                        "Bob Barrows [MVP]" <reb01501@NOyah oo.SPAMcom> wrote in message
                        news:O0$Gj77iGH A.1260@TK2MSFTN GP05.phx.gbl...[color=blue]
                        > Mike Brind wrote:[color=green][color=darkred]
                        > >>
                        > >> No. you'll find yourself wondering how you ever did without it.
                        > >>[/color]
                        > >
                        > > Bob, or Anthony (or anyone who primarily uses VS) - could you explain
                        > > the main features of VS that you find indispensible in classic ASP
                        > > development?
                        > >[/color]
                        >
                        > Anthony extolled on the virtues of the debugger (which frankly, I rarely[/color]
                        use[color=blue]
                        > for server-side code because it rarely works on my development server,[/color]

                        Do you mean remote debugging? I've never got that to work so you're doing
                        better than me :)
                        I've never got T-SQL debugging to work either probably for the same reason.
                        [color=blue]
                        >which
                        > my workplace requires me to use - when I do need to use it, I have to copy
                        > my project to my personal machine, debug it and make corrections to the[/color]
                        code[color=blue]
                        > on the development server - very unwieldy, so I mainly use the
                        > response.write approach).
                        >[/color]

                        We use a shared development machine only for systems integration testing.
                        When the source is checked in the shadow folder for the checked in code
                        forms the root of the testing web site. If things don't go well we fetch
                        all checked in code to our local machines and reproduce and debug the
                        problem there.
                        [color=blue]
                        > I've used both Notepad and VS for development. Having used VS, I will[/color]
                        never[color=blue]
                        > go back to Notepad by choice. The reasons?
                        > 1. Integration with the MSDN library and Platform SDK for[/color]
                        context-sensitive[color=blue]
                        > help
                        > 2. Intellisense - yes there are times it gets in the way, but I'm[/color]
                        constantly[color=blue]
                        > using ctrl-space to autocomplete words
                        > 3. Color-coding of statements: comments are green, <% have yellow
                        > background, string literals are maroon ...
                        > 5. Right-click -> View in browser
                        > 6. Solution Explorer - having a solution containing all the projects
                        > (websites) that I will need to work on in one place. For example, I will
                        > typically have a solution containing the development, QA and production
                        > versions of a site, making deployment very simple.
                        > 7. Integrated source control
                        >
                        > There's more but i need to move on.
                        >
                        >
                        > --
                        > Microsoft MVP - ASP/ASP.NET
                        > Please reply to the newsgroup. This email account is my spam trap so I
                        > don't check it very often. If you must reply off-line, then remove the
                        > "NO SPAM"
                        >
                        >[/color]


                        Comment

                        • Michael Kujawa

                          #42
                          Re: How can i view Debug.Write?

                          "Mike Brind" <paxtonend@hotm ail.com> wrote in message
                          news:1149886617 .600583.124460@ c74g2000cwc.goo glegroups.com.. .[color=blue]
                          >
                          >
                          > I was trying to work out if there is any reason I should be looking to
                          > switch from Dreamweaver 8. At the moment there is nothing compelling
                          > in the list you have provided. They are all good features, but DW
                          > offers most of them:[/color]
                          <snip>[color=blue]
                          > Mike Brind
                          >[/color]

                          That sort of sums it up for me as well. I will stick with the most
                          reliable for me... DW8 and Notepad.

                          Although I figured I should get cracking at .Net sometime soon.
                          So I went ahead and purchased VS Studio 2005 Professional
                          Upgrade. Still quite steep in price but glad owning VFP 9 gave
                          me a price break.

                          Mike Kujawa


                          Comment

                          • Mike Brind

                            #43
                            Re: How can i view Debug.Write?


                            Michael Kujawa wrote:[color=blue]
                            > "Mike Brind" <paxtonend@hotm ail.com> wrote in message
                            > news:1149886617 .600583.124460@ c74g2000cwc.goo glegroups.com.. .[color=green]
                            > >
                            > >
                            > > I was trying to work out if there is any reason I should be looking to
                            > > switch from Dreamweaver 8. At the moment there is nothing compelling
                            > > in the list you have provided. They are all good features, but DW
                            > > offers most of them:[/color]
                            > <snip>[color=green]
                            > > Mike Brind
                            > >[/color]
                            >
                            > That sort of sums it up for me as well. I will stick with the most
                            > reliable for me... DW8 and Notepad.
                            >
                            > Although I figured I should get cracking at .Net sometime soon.
                            > So I went ahead and purchased VS Studio 2005 Professional
                            > Upgrade. Still quite steep in price but glad owning VFP 9 gave
                            > me a price break.[/color]

                            Hmmm. I bought VS2003 Developer at just over £1300 (about $4000 at
                            today's exchange rate, I think :-P) for having a crack at dotnet. It's
                            hardly ever been used. Now they've released v2.0, and are giving IDEs
                            away.... But at least I'm now making much more use of SQL Server.

                            Notepad? That only sees the light of day whan I need to strip MS
                            Office formatting from text prior to posting it in a rich text
                            editor....

                            --
                            Mike Brind

                            Comment

                            • Ian Boyd

                              #44
                              Re: How can i view Debug.Write?

                              >> VS I suppose maybe be best.[color=blue][color=green]
                              >>
                              >> Although, I am considering biting the bullet and purchasing a
                              >> copy of VS. I have some very complex projects coming up
                              >> and VS may be right for those projects. Hopefully there
                              >> is not a long learning or unlearning curve?[/color]
                              >
                              > No. you'll find yourself wondering how you ever did without it.[/color]

                              That's what i thought when i convinced the company to get VS2005.

                              The web programming language plugin for VS2005 is called "Visual Web
                              Developer". Apparently this replaces FrontPage, but as FrontPage was
                              removed, so was native support for ASP.

                              As i read from a lot of upset and frustrated web developers who upgraded to
                              2005, if you want to develop in ASP, you need to acquire a copy of 2003
                              instead.


                              Comment

                              • Aaron Bertrand [SQL Server MVP]

                                #45
                                Re: How can i view Debug.Write?

                                > As i read from a lot of upset and frustrated web developers who upgraded[color=blue]
                                > to 2005, if you want to develop in ASP, you need to acquire a copy of 2003
                                > instead.[/color]

                                I develop all of my ASP pages in 2005 (File | Open).

                                Then again, I have little use for frilly wizards and projects and publishing
                                tools, which is probably where most of the complaints are.


                                Comment

                                Working...