How can i view Debug.Write?

Discussion in 'ASP General' started by Ian Boyd, Jun 2, 2006.

  1. Ian Boyd

    Ian Boyd Guest

    IIS5, on a Windows 2000 Server machine.

    Debeg.WriteLine "Hello, world!"


    How can i view it?
     
    Ian Boyd, Jun 2, 2006
    #1
    1. Advertising

  2. Ian Boyd

    Mike Brind Guest

    Ian Boyd wrote:
    > IIS5, on a Windows 2000 Server machine.
    >
    > Debeg.WriteLine "Hello, world!"
    >
    >
    > How can i view it?


    <%
    Response.Write "Hello World"
    %>

    --
    Mike Brind
     
    Mike Brind, Jun 2, 2006
    #2
    1. Advertising

  3. Ian Boyd

    Ian Boyd Guest

    "Mike Brind" <> wrote in message
    news:...
    >
    > Ian Boyd wrote:
    >> IIS5, on a Windows 2000 Server machine.
    >>
    >> Debeg.WriteLine "Hello, world!"
    >>
    >>
    >> How can i view it?

    >
    > <%
    > Response.Write "Hello World"
    > %>



    I will always cherish the initial misconceptions I had about you.
     
    Ian Boyd, Jun 2, 2006
    #3
  4. Ian Boyd

    Mike Brind Guest

    Ian Boyd wrote:
    > "Mike Brind" <> wrote in message
    > news:...
    > >
    > > Ian Boyd wrote:
    > >> IIS5, on a Windows 2000 Server machine.
    > >>
    > >> Debeg.WriteLine "Hello, world!"
    > >>
    > >>
    > >> How can i view it?

    > >
    > > <%
    > > Response.Write "Hello World"
    > > %>

    >
    >
    > I will always cherish the initial misconceptions I had about you.


    That's gone wayyyyyyyyy over my head.

    --
    Mike Brind
     
    Mike Brind, Jun 2, 2006
    #4
  5. Ian Boyd wrote:
    > IIS5, on a Windows 2000 Server machine.
    >
    > Debeg.WriteLine "Hello, world!"
    >
    >
    > How can i view it?

    I know of no debugger for classic ASP-based script that supplies a Debug
    object similar to the one used in VB, which is what I presume you are
    talking about. As Mike says, you pretty much have to resort to
    Response.write, of create your own custom debugging class:
    http://support.microsoft.com/kb/299986/EN-US/
    --
    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.
     
    Bob Barrows [MVP], Jun 2, 2006
    #5
  6. Ian Boyd

    Mike Brind Guest

    Mike Brind wrote:
    > Ian Boyd wrote:
    > > "Mike Brind" <> wrote in message
    > > news:...
    > > >
    > > > Ian Boyd wrote:
    > > >> IIS5, on a Windows 2000 Server machine.
    > > >>
    > > >> Debeg.WriteLine "Hello, world!"
    > > >>
    > > >>
    > > >> How can i view it?
    > > >
    > > > <%
    > > > Response.Write "Hello World"
    > > > %>

    > >
    > >
    > > I will always cherish the initial misconceptions I had about you.

    >
    > That's gone wayyyyyyyyy over my head.
    >


    Oh, hold on a minute. I Googled your odd phrase, and it appears to be
    some kind of sarcastic put-down. So I asked myself why I had earned
    that reaction, and did a bit more googling.

    Now I kind of thought that you were coming from a VBA/VB6 direction,
    and trying to apply those debugging practices to classic asp, hence my
    answer. At first, I didn't spot that your post had changed from
    debug.write in the subject to debeg[sic].writeLINE in the body, but
    debug.writeline is used in VB.NET (maybe other places as well, for all
    I know), which suggests to me that you are using ASP.NET.

    If that's the case, you're in the wrong group, and I select number 3 in
    the this list (http://www.pushback.com/fun/BestComebacks.html) for you.

    --
    Mike Brind
     
    Mike Brind, Jun 2, 2006
    #6
  7. Ian Boyd

    Ian Boyd Guest

    > IIS5, on a Windows 2000 Server machine.
    >
    > Debeg.WriteLine "Hello, world!"
    >
    >
    > How can i view it?
    >
    > <%
    > Response.Write "Hello World"
    > %>



    Let me clarify.

    i'm coming into "ASP Programming" from C/C++ WinAPI programming.

    It turns out that "ASP code" is actually VBScript, and it looks like the ASP
    ISAPI extension for IIS uses the windows scripting engine. One of the
    features available in the VBScripting engine is an intrinsic object called
    Debug, which has two useful methods
    Debug.Write
    and
    Debug.WriteLine

    Unfortunaly, i cannot find where the ASP ISAPI extension for IIS puts the
    "console output" on the web server; it doesn't output it as
    OutputDebugStrings. Nor can i find any generally available "console" for
    IIS.


    Referring to your answer to my question: how does <%Response.Write()%> help
    me view the output of Debug.Write?


    > If that's the case, you're in the wrong group, and I select number 3 in
    > the this list (http://www.pushback.com/fun/BestComebacks.html) for you.


    Good show old man, very well played.
     
    Ian Boyd, Jun 3, 2006
    #7
  8. Ian Boyd

    Ian Boyd Guest

    > I know of no debugger for classic ASP-based script that supplies a Debug
    > object similar to the one used in VB


    It's not VB, it's VBScript

    http://msdn.microsoft.com/library/d...html/dd5dc02a-71e4-412b-8b30-9cc2d3d5e6fb.asp


    ASP uses the scripting engine. The scripting engine has "console output".
    Where does the ASP ISASP plugin for IIS, which is hosting the scripting
    engine, redirect any "console" output to?
     
    Ian Boyd, Jun 3, 2006
    #8
  9. Ian Boyd

    Evertjan. Guest

    Ian Boyd wrote on 03 jun 2006 in
    microsoft.public.inetserver.asp.general:

    > It turns out that "ASP code" is actually VBScript,


    No,
    the ASP platform supports two scripting languages: VBscript and Jscript.

    > and it looks like
    > the ASP ISAPI extension for IIS uses the windows scripting engine. One
    > of the features available in the VBScripting engine is an intrinsic
    > object called Debug, which has two useful methods
    > Debug.Write


    As ASP is on a server, it has no intrinsic console/human interface,
    and a serverside output is not available.

    The debug object would have no output so is not implemented.



    > Referring to your answer to my question: how does <%Response.Write()%>
    > help me view the output of Debug.Write?


    <% Response.Write('Hello world') %>
    or
    <% = 'Hello world' %>
    being minimal Jscript

    <% Response.Write "Hello world" %>
    or
    <% = "Hello world" %>
    being minimal VBscript


    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Jun 3, 2006
    #9
  10. Ian Boyd wrote:
    >> I know of no debugger for classic ASP-based script that supplies a
    >> Debug object similar to the one used in VB

    >
    > It's not VB, it's VBScript
    >

    Umm, read my sentence again. Where did I say that I thought you were using
    VB in ASP?
    >
    >
    > ASP uses the scripting engine. The scripting engine has "console
    > output".


    But ASP doesn't, so this is not implemented.

    > Where does the ASP ISASP plugin for IIS, which is hosting the
    > scripting engine, redirect any "console" output to?


    I just tried to debug a vbs file (using the debugger available in VS2003)
    containing a debug.write statement and nothing appearred in the Immediate
    window. Are you sure this works for vbscript files?

    --
    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"
     
    Bob Barrows [MVP], Jun 3, 2006
    #10
  11. Ian Boyd

    Mike Brind Guest

    Ian Boyd wrote:
    > > IIS5, on a Windows 2000 Server machine.
    > >
    > > Debeg.WriteLine "Hello, world!"
    > >
    > >
    > > How can i view it?
    > >
    > > <%
    > > Response.Write "Hello World"
    > > %>

    >
    >
    > Let me clarify.
    >
    > i'm coming into "ASP Programming" from C/C++ WinAPI programming.
    >
    > It turns out that "ASP code" is actually VBScript,


    There is no such thing as "ASP code" as such, in just the same way as
    there is no such thing as Dotnet code, for example. ASP is a
    server-side technology for dynamically outputting html to the browser.
    As Evertjan says, ASP supports a number of scripting languages.
    VBScript is one of them, JScript, Javascript and Perl are others.

    and it looks like the ASP
    > ISAPI extension for IIS uses the windows scripting engine. One of the
    > features available in the VBScripting engine is an intrinsic object called
    > Debug, which has two useful methods
    > Debug.Write
    > and
    > Debug.WriteLine
    >
    > Unfortunaly, i cannot find where the ASP ISAPI extension for IIS puts the
    > "console output" on the web server; it doesn't output it as
    > OutputDebugStrings. Nor can i find any generally available "console" for
    > IIS.


    That's because there is no console output in ASP. As I said in my
    first post (which you completely dismissed), you have to output html to
    a browser to debug your code. You do that by utilising the Response
    object's Write method.

    >
    >
    > Referring to your answer to my question: how does <%Response.Write()%> help
    > me view the output of Debug.Write?


    Debug.Write/WriteLine does not exist in ASP. Response.Write is its
    equivalent.

    Have you looked at ASP.NET instead? It might be a lot closer to what
    you are used to. I would suggest that the learning curve for dotnet
    wouldn't be so steep for you. It probably won't test your patience so
    much.

    --
    Mike Brind
     
    Mike Brind, Jun 3, 2006
    #11
  12. "Ian Boyd" <> wrote in message
    news:...
    > > IIS5, on a Windows 2000 Server machine.
    > >
    > > Debeg.WriteLine "Hello, world!"
    > >
    > >
    > > How can i view it?
    > >
    > > <%
    > > Response.Write "Hello World"
    > > %>

    >
    >
    > Let me clarify.
    >
    > i'm coming into "ASP Programming" from C/C++ WinAPI programming.
    >
    > It turns out that "ASP code" is actually VBScript, and it looks like the

    ASP
    > ISAPI extension for IIS uses the windows scripting engine. One of the
    > features available in the VBScripting engine is an intrinsic object called
    > Debug, which has two useful methods
    > Debug.Write
    > and
    > Debug.WriteLine
    >
    > Unfortunaly, i cannot find where the ASP ISAPI extension for IIS puts the
    > "console output" on the web server; it doesn't output it as
    > OutputDebugStrings. Nor can i find any generally available "console" for
    > IIS.
    >


    Dunno what "OutputDebugStrings" is, however it works fine for me in the VS
    2003 output window.

    See:-

    http://msdn.microsoft.com/library/d...html/0530c5f1-c079-4d1a-aa42-b3f9bbf74e41.asp


    >
    > Referring to your answer to my question: how does <%Response.Write()%>

    help
    > me view the output of Debug.Write?
    >


    It doesn't.

    >
    > > If that's the case, you're in the wrong group, and I select number 3 in
    > > the this list (http://www.pushback.com/fun/BestComebacks.html) for you.

    >
    > Good show old man, very well played.
    >
    >
    >
     
    Anthony Jones, Jun 3, 2006
    #12
  13. "Bob Barrows [MVP]" <> wrote in message
    news:...
    > Ian Boyd wrote:
    > >> I know of no debugger for classic ASP-based script that supplies a
    > >> Debug object similar to the one used in VB

    > >
    > > It's not VB, it's VBScript
    > >

    > Umm, read my sentence again. Where did I say that I thought you were

    using
    > VB in ASP?
    > >
    > >
    > > ASP uses the scripting engine. The scripting engine has "console
    > > output".

    >
    > But ASP doesn't, so this is not implemented.
    >
    > > Where does the ASP ISASP plugin for IIS, which is hosting the
    > > scripting engine, redirect any "console" output to?

    >
    > I just tried to debug a vbs file (using the debugger available in VS2003)
    > containing a debug.write statement and nothing appearred in the Immediate
    > window. Are you sure this works for vbscript files?
    >


    Use the output window set to debug (which is the only choice you have when
    debugging ASP).

    > --
    > 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"
    >
    >
     
    Anthony Jones, Jun 3, 2006
    #13
  14. Anthony Jones wrote:

    >>
    >> I just tried to debug a vbs file (using the debugger available in
    >> VS2003) containing a debug.write statement and nothing appearred in
    >> the Immediate window. Are you sure this works for vbscript files?
    >>

    >
    > Use the output window set to debug (which is the only choice you have
    > when debugging ASP).
    >

    I wasn't debugging ASP. I was debugging a file called test.vbs. No ASP
    involved.

    It had just 3 lines:

    stop
    debug.write "test"
    stop

    But you're right. It somehow switched away from the output window without my
    noticing it. I just tried again and, when I switched back to the output
    window, the "test" was written to it. So it is certainly possible to use
    debug.write in a vbs file.

    Now to try it in ASP ...

    --
    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"
     
    Bob Barrows [MVP], Jun 3, 2006
    #14
  15. Anthony Jones wrote:
    > Use the output window set to debug (which is the only choice you have
    > when debugging ASP).
    >


    You're right. It does work when debuggin an ASP process. Sorry Ian.
    --
    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"
     
    Bob Barrows [MVP], Jun 3, 2006
    #15
  16. Ian Boyd

    Mike Brind Guest

    Mike Brind wrote:
    > Ian Boyd wrote:
    > > > IIS5, on a Windows 2000 Server machine.
    > > >
    > > > Debeg.WriteLine "Hello, world!"
    > > >
    > > >
    > > > How can i view it?
    > > >
    > > > <%
    > > > Response.Write "Hello World"
    > > > %>

    > >
    > >
    > > Let me clarify.
    > >
    > > i'm coming into "ASP Programming" from C/C++ WinAPI programming.
    > >
    > > It turns out that "ASP code" is actually VBScript,

    >
    > There is no such thing as "ASP code" as such, in just the same way as
    > there is no such thing as Dotnet code, for example. ASP is a
    > server-side technology for dynamically outputting html to the browser.
    > As Evertjan says, ASP supports a number of scripting languages.
    > VBScript is one of them, JScript, Javascript and Perl are others.
    >
    > and it looks like the ASP
    > > ISAPI extension for IIS uses the windows scripting engine. One of the
    > > features available in the VBScripting engine is an intrinsic object called
    > > Debug, which has two useful methods
    > > Debug.Write
    > > and
    > > Debug.WriteLine
    > >
    > > Unfortunaly, i cannot find where the ASP ISAPI extension for IIS puts the
    > > "console output" on the web server; it doesn't output it as
    > > OutputDebugStrings. Nor can i find any generally available "console" for
    > > IIS.

    >


    Large portion of humble pie for me please.

    Go to the properties of your application in IIS Management Console, and
    click on the Configuration button. On the App Debugging tab, select
    "Enable ASP server-side script debugging". That brings the Microsoft
    Script Debugger into play (it's installed as part of IIS on Win 2000),
    and will display error messages etc on the server (which is what you
    asked for). You can start the debugger by using the code that Bob
    showed, or by selecting it from Start -> Programs ->Accessories.

    I'm not sure that Debug.Write works, but the command window allows you
    to test the value of variables by typing ?variablename. I can't test
    the Script Debugger, because I have VS 2003 installed on my machine,
    and that seems to have replaced the script debugger - if I indeed ever
    had it on XP Pro.

    You have my apologies, of course.

    --
    Mike Brind
     
    Mike Brind, Jun 3, 2006
    #16
  17. Ian Boyd

    Mike Brind Guest

    Mike Brind wrote:
    > Mike Brind wrote:
    > > Ian Boyd wrote:
    > > > > IIS5, on a Windows 2000 Server machine.
    > > > >
    > > > > Debeg.WriteLine "Hello, world!"
    > > > >
    > > > >
    > > > > How can i view it?
    > > > >
    > > > > <%
    > > > > Response.Write "Hello World"
    > > > > %>
    > > >
    > > >
    > > > Let me clarify.
    > > >
    > > > i'm coming into "ASP Programming" from C/C++ WinAPI programming.
    > > >
    > > > It turns out that "ASP code" is actually VBScript,

    > >
    > > There is no such thing as "ASP code" as such, in just the same way as
    > > there is no such thing as Dotnet code, for example. ASP is a
    > > server-side technology for dynamically outputting html to the browser.
    > > As Evertjan says, ASP supports a number of scripting languages.
    > > VBScript is one of them, JScript, Javascript and Perl are others.
    > >
    > > and it looks like the ASP
    > > > ISAPI extension for IIS uses the windows scripting engine. One of the
    > > > features available in the VBScripting engine is an intrinsic object called
    > > > Debug, which has two useful methods
    > > > Debug.Write
    > > > and
    > > > Debug.WriteLine
    > > >
    > > > Unfortunaly, i cannot find where the ASP ISAPI extension for IIS puts the
    > > > "console output" on the web server; it doesn't output it as
    > > > OutputDebugStrings. Nor can i find any generally available "console" for
    > > > IIS.

    > >

    >
    > Large portion of humble pie for me please.
    >
    > Go to the properties of your application in IIS Management Console, and
    > click on the Configuration button. On the App Debugging tab, select
    > "Enable ASP server-side script debugging". That brings the Microsoft
    > Script Debugger into play (it's installed as part of IIS on Win 2000),
    > and will display error messages etc on the server (which is what you
    > asked for). You can start the debugger by using the code that Bob
    > showed, or by selecting it from Start -> Programs ->Accessories.
    >
    > I'm not sure that Debug.Write works,


    It does. I downloaded the debugger from microsoft, and debug.write
    outputs to the command window.

    --
    Mike Brind
     
    Mike Brind, Jun 4, 2006
    #17
  18. Mike Brind wrote:
    >> I'm not sure that Debug.Write works,

    >
    > It does. I downloaded the debugger from microsoft, and debug.write
    > outputs to the command window.

    Yeah, i had never tried it. I alwasy just assumed it wouldn't work.
    --
    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"
     
    Bob Barrows [MVP], Jun 4, 2006
    #18
  19. Ian Boyd

    Ian Boyd Guest

    > Debeg.WriteLine "Hello, world!"
    >
    > How can i view it?


    We seem to have strayed a bit.

    Create a file on your web-server:

    DebugTest.asp
    ===========
    <% Debug.WriteLine("Hello, world!") %>

    Can someone please sum up the IIS options, the ASP options, the programs,
    the program options required to view this debug output?


    i happen to have the Microsoft Script Debugger installed on my local
    machine; and if i have it running while the web-server executes
    DebugTest.asp, i do not see any output (at least not in the Call Stack,
    Running Documents or Command Windows.)

    i also happen to have Microsoft Visual Studio 2005 installed, and if i have
    it running while the web-server executes DebugTest.asp, i do not see any
    output. The web-site is in "medium" security (application pooling) mode, and
    i do not see any debug output if i have attached the debugger to
    dllhost.exe - perhaps i don't have the proper window up in VS2005
    (View..Output does not show anything at any rate)

    i am (right now) using the Windows XP built-in IIS, and i have configured
    the options under
    Website
    ->Properties
    -> Home Directory
    -> Configuration
    -> App Debugging
    X Enable ASP server-side script debugging
    X Enable ASP client-side script debugging

    NOTE: You cannot use the "Internet Information Services" management tool
    that comes with Windows XP to set these options, you must use the IIS admin
    tool on a Windows Server machine and connect back to your local computer.
    The symtpons of it not working are: nothing happens when you push the
    "Configuration" button.


    i've never written VBScript outside of ASP. i've never used the Microsoft
    Script Debugger outside of debugging Javascript from Internet Explorer.
     
    Ian Boyd, Jun 5, 2006
    #19
  20. Ian Boyd wrote:
    >> Debeg.WriteLine "Hello, world!"
    >>
    >> How can i view it?

    >
    > We seem to have strayed a bit.
    >
    > Create a file on your web-server:
    >
    > DebugTest.asp
    > ===========
    > <% Debug.WriteLine("Hello, world!") %>
    >
    > Can someone please sum up the IIS options, the ASP options, the
    > programs, the program options required to view this debug output?
    >

    In IIS Manager, set Application protection to Low, and go into the
    Application properties and enable debugging.
    I used a Stop statement in the code to force the debugger to attach to
    the process.
    >
    > i happen to have the Microsoft Script Debugger installed on my local
    > machine; and if i have it running while the web-server executes
    > DebugTest.asp, i do not see any output (at least not in the Call
    > Stack, Running Documents or Command Windows.)


    I can't seem to make the debugger run standalone, but since you seem to
    have discovered this trick, you need to attach the debugger to the asp
    process being run. Using a Stop statement in the code makes this happen.

    >
    > i also happen to have Microsoft Visual Studio 2005 installed, and if
    > i have it running while the web-server executes DebugTest.asp, i do
    > not see any output.


    Have you attached it to the process? Look at the Debug menu, which
    should contain an Attach to Process option.

    --
    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.
     
    Bob Barrows [MVP], Jun 5, 2006
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. could ildg
    Replies:
    0
    Views:
    476
    could ildg
    Jul 1, 2005
  2. Jeff Epler
    Replies:
    0
    Views:
    405
    Jeff Epler
    Jul 1, 2005
  3. could ildg
    Replies:
    0
    Views:
    513
    could ildg
    Jul 2, 2005
  4. Robert Smith
    Replies:
    2
    Views:
    1,262
    Juan T. Llibre
    Apr 27, 2008
  5. Parthiv Joshi
    Replies:
    1
    Views:
    751
    Samuel L Matzen
    Jul 6, 2004
Loading...

Share This Page