Hi,
Does anyone happen to have a debug script that will display the variable
name and value for all of the local variables on an .asp page? (not session
nor application, as I already have scripts those.) I'm looking for
something that can be included in an .asp to write out values for debugging.
Does anyone know what scope those variables reside in?
Please help if you can.
Thanks,
-Rigs 4 2016
There is no functionality built in to ASP that will do this for you, no.
You'd have to response.write them where you want them. If your pages just
consist of ASP code not contained in any subs or anything, your vars will
have global scope in the page. So, you could write a function to display
your values and just call that function where you need it.
<%
Dim a, b, c, d
'''code, code, code
Call WriteVals("line 32")
'''code, code, cone
Call WriteVals("Just created e-mail object")
'''code, code, code
Call WriteVals("About to insert data into database."
Function WriteVals(MarkerStatement)
Response.Write "<hr>"
Response.Write MarkerStatment & "<br>"
Response.Write "a=" & a & "<br>"
Response.Write "b=" & b & "<br>"
Response.Write "c=" & c & "<br>"
Response.Write "d=" & d
End Function
%>
Be sure you use Option Explicit.
Ray at work
"Rigs" <jc******@spartanmotors.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl... Hi,
Does anyone happen to have a debug script that will display the variable name and value for all of the local variables on an .asp page? (not session nor application, as I already have scripts those.) I'm looking for something that can be included in an .asp to write out values for debugging. Does anyone know what scope those variables reside in?
Please help if you can.
Thanks, -Rigs
Ray,
Thanks, but I am looking for more of a collection type solution.
Response.write would be quite tedious for this page. (lots of vars for
calcs and such...)
Is "global" part of a collection? That way I could write out the variables
and their values like I do with the session vars? Below is my session var
code. I am 'hoping' there's an equivalent for local global variables.
Session write out code:
For Each Item in Session.Contents
Response.write Item & " = " & Session.Contents(Item) & "<BR>"
For Each ItemKey in Session.Contents(Item)
Response.Write "Sub Item: " & Item & " (" & ItemKey & ") : " _
& Session.Contents(Item)(ItemKey) & "<br>"
Next
Next
Please let me know your thoughts either way and thanks again for your help.
-Rigs
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:O5****************@TK2MSFTNGP12.phx.gbl... There is no functionality built in to ASP that will do this for you, no. You'd have to response.write them where you want them. If your pages just consist of ASP code not contained in any subs or anything, your vars will have global scope in the page. So, you could write a function to display your values and just call that function where you need it.
<% Dim a, b, c, d
'''code, code, code Call WriteVals("line 32")
'''code, code, cone Call WriteVals("Just created e-mail object")
'''code, code, code Call WriteVals("About to insert data into database."
Function WriteVals(MarkerStatement) Response.Write "<hr>" Response.Write MarkerStatment & "<br>" Response.Write "a=" & a & "<br>" Response.Write "b=" & b & "<br>" Response.Write "c=" & c & "<br>" Response.Write "d=" & d End Function %>
Be sure you use Option Explicit.
Ray at work
"Rigs" <jc******@spartanmotors.com> wrote in message news:%2***************@TK2MSFTNGP12.phx.gbl... Hi,
Does anyone happen to have a debug script that will display the variable name and value for all of the local variables on an .asp page? (not session nor application, as I already have scripts those.) I'm looking for something that can be included in an .asp to write out values for debugging. Does anyone know what scope those variables reside in?
Please help if you can.
Thanks, -Rigs
Unfortunately, no, there is no collection you can itterate through. This
question has come up a number of times, and I do not recall anyone coming up
with anything to solve this need yet. :[
Ray at work
"Rigs" <jc******@spartanmotors.com> wrote in message
news:ek**************@TK2MSFTNGP10.phx.gbl... Ray,
Thanks, but I am looking for more of a collection type solution. Response.write would be quite tedious for this page. (lots of vars for calcs and such...)
Is "global" part of a collection? That way I could write out the variables and their values like I do with the session vars? Below is my session var code. I am 'hoping' there's an equivalent for local global variables.
Session write out code: For Each Item in Session.Contents Response.write Item & " = " & Session.Contents(Item) & "<BR>" For Each ItemKey in Session.Contents(Item) Response.Write "Sub Item: " & Item & " (" & ItemKey & ") : " _ & Session.Contents(Item)(ItemKey) & "<br>" Next Next
Please let me know your thoughts either way and thanks again for your help. -Rigs
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in message news:O5****************@TK2MSFTNGP12.phx.gbl... There is no functionality built in to ASP that will do this for you, no. You'd have to response.write them where you want them. If your pages just consist of ASP code not contained in any subs or anything, your vars will have global scope in the page. So, you could write a function to display your values and just call that function where you need it.
<% Dim a, b, c, d
'''code, code, code Call WriteVals("line 32")
'''code, code, cone Call WriteVals("Just created e-mail object")
'''code, code, code Call WriteVals("About to insert data into database."
Function WriteVals(MarkerStatement) Response.Write "<hr>" Response.Write MarkerStatment & "<br>" Response.Write "a=" & a & "<br>" Response.Write "b=" & b & "<br>" Response.Write "c=" & c & "<br>" Response.Write "d=" & d End Function %>
Be sure you use Option Explicit.
Ray at work
"Rigs" <jc******@spartanmotors.com> wrote in message news:%2***************@TK2MSFTNGP12.phx.gbl... > Hi, > > Does anyone happen to have a debug script that will display the > variable > name and value for all of the local variables on an .asp page? (not > session > nor application, as I already have scripts those.) I'm looking for > something that can be included in an .asp to write out values for > debugging. > Does anyone know what scope those variables reside in? > > Please help if you can. > > Thanks, > -Rigs > >
That stinks... But thanks for your input. What was MS thinking when it
left those vars out of a collection, yet placing all other vars in one!?!?
I appreciate your assistance.
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:e1**************@TK2MSFTNGP11.phx.gbl... Unfortunately, no, there is no collection you can itterate through. This question has come up a number of times, and I do not recall anyone coming
up with anything to solve this need yet. :[
Ray at work
"Rigs" <jc******@spartanmotors.com> wrote in message news:ek**************@TK2MSFTNGP10.phx.gbl... Ray,
Thanks, but I am looking for more of a collection type solution. Response.write would be quite tedious for this page. (lots of vars for calcs and such...)
Is "global" part of a collection? That way I could write out the variables and their values like I do with the session vars? Below is my session
var code. I am 'hoping' there's an equivalent for local global variables.
Session write out code: For Each Item in Session.Contents Response.write Item & " = " & Session.Contents(Item) & "<BR>" For Each ItemKey in Session.Contents(Item) Response.Write "Sub Item: " & Item & " (" & ItemKey & ") : " _ & Session.Contents(Item)(ItemKey) & "<br>" Next Next
Please let me know your thoughts either way and thanks again for your help. -Rigs
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in message news:O5****************@TK2MSFTNGP12.phx.gbl... There is no functionality built in to ASP that will do this for you,
no. You'd have to response.write them where you want them. If your pages just consist of ASP code not contained in any subs or anything, your vars
will have global scope in the page. So, you could write a function to
display your values and just call that function where you need it.
<% Dim a, b, c, d
'''code, code, code Call WriteVals("line 32")
'''code, code, cone Call WriteVals("Just created e-mail object")
'''code, code, code Call WriteVals("About to insert data into database."
Function WriteVals(MarkerStatement) Response.Write "<hr>" Response.Write MarkerStatment & "<br>" Response.Write "a=" & a & "<br>" Response.Write "b=" & b & "<br>" Response.Write "c=" & c & "<br>" Response.Write "d=" & d End Function %>
Be sure you use Option Explicit.
Ray at work
"Rigs" <jc******@spartanmotors.com> wrote in message news:%2***************@TK2MSFTNGP12.phx.gbl... > Hi, > > Does anyone happen to have a debug script that will display the > variable > name and value for all of the local variables on an .asp page? (not > session > nor application, as I already have scripts those.) I'm looking for > something that can be included in an .asp to write out values for > debugging. > Does anyone know what scope those variables reside in? > > Please help if you can. > > Thanks, > -Rigs > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: João Santa Bárbara |
last post by:
Hi all, i have a function in VB.NET which is too big
when i try to debug it, i can´t .
is there a FIX for it ???
JSB
|
by: Stephanie |
last post by:
I have a problem that I am trying to solve. We have a huge product with a
whole lot of ASP and VB code. VB code is all ActiveX dlls which are used by
ASP app. When I attempt to add features or fix...
|
by: joemynz |
last post by:
Help please with a URLError. Invoking a url that works in Firefox and
IE results in a "urlerror 7, no address ..." in python. I need to debug
why.
Traceback is below. There's a redirect when the...
|
by: Ian Boyd |
last post by:
IIS5, on a Windows 2000 Server machine.
Debeg.WriteLine "Hello, world!"
How can i view it?
|
by: Epetruk |
last post by:
Hello,
I have a problem where an application I am working on throws an
OutOfMemoryException when I run it in Release mode, whereas it doesn't do
this when I am running in Debug.
The...
| |
by: Bill_DBA |
last post by:
I have the following stored procedure that is called from the source of
a transformation in a DTS package. The first parameter turns on PRINT
debug messages. The second, when equals 1, turns on the...
|
by: Scubadude |
last post by:
Hi,
I'm new to perl and have run into some roadblocks while trying to run
tutorials.
I have installed Apache v2.2.3
I have installed ActivePerl v6.6.1.638
I have installed php v5.2.0
I am...
|
by: Zytan |
last post by:
I see that static is more restricted in C# than in C++. It appears
usable only on classes and methods, and data members, but cannot be
created within a method itself. Surely this is possible in...
|
by: =?Utf-8?B?bG10dGFn?= |
last post by:
We have developed a number of different applications (ASP.NET web site,
Windows services, DLLs, Windows forms, etc.) in C# 2.0. We have developed
and unit tested all these applications/components...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |