DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2004

    Variable Name and Value Properties

    I use a lot of debug statements in VBScript code when I'm debugging. For example

    response.write("varTestVariable = " & varTestVariable & "<BR>")

    This is a lot of typing and I almost always forget one quote or another. So I thought creating a sub to do this with less typing would be great. I created the following sub.

    Sub Debug(pasVariable)
    response.write(pasVariable.name & " = " & pasVariable & "<BR>")
    End Sub

    What I would like to do is first display the variable name and then its value. My question is is there any way to get the name property of a variable in VBScript in addition to the value property? If I can get this, I only need to type in the variable name. Otherwise I need to do more typing.

    Thanks in advance for your help!

  2. #2
    Join Date
    Nov 2003
    Portland, OR
    Hi, Jay: No, I don't know of any way to do this.
    Phil Weber

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  3. #3
    Join Date
    Mar 2004
    Jacksonville Florida USA
    sigh, vbscript != vb.net, so if this is vbscript this is not an asp.net question but rather an asp classic question. I would put them in some elements on the page, write them out myself, then get them back in the othersub when the page is resent. You can also send them to the other sub through that code, but you would have to know the value in the other sub when you recieve those variables. Why exactly do you debug like this? Why not just make this and run it and se if it works? I have never done debugging like how you are.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

By using this site, you agree to the Privacy Policy