欧美阿v视频在线大全_亚洲欧美中文日韩V在线观看_www性欧美日韩欧美91_亚洲欧美日韩久久精品

主頁 > 知識庫 > asp下調試程序的debug類

asp下調試程序的debug類

熱門標簽:常用地圖標注范圍點 為什么外呼系統需要預存話費呢 離線電子地圖標注軟件注冊 咸陽銷售外呼系統 寧夏怎么申請400電話 辦理400電話一年多少錢 蘭州智能語音電銷機器人功能 外呼回撥系統圖片 企數外呼系統能用多久
ASP中最頭疼的就是調試程序的時候不方便,我想可能很多朋友都會用這樣的方法“response.write ”,然后輸出相關的語句來看看是否正確。前幾天寫了一個千行的頁面,里面大概有七八個SUB/FUNCTION,調試的時候用了有三十幾個 response.write ,天,調試完后把這三十個一個個刪除,累!

今天看到一個ASP中的Debug類(VBS),試用了一下,絕!

使用方法很簡單:

test.asp

!--#INCLUDE FILE="debuggingConsole.asp"-->
%
output="XXXX"
Set debugstr = New debuggingConsole
debugstr.Enabled = true
debugstr.Print "參數output的值", output
''……
debugstr.draw
Set debugstr = Nothing
%>

===================================================

debuggingConsole.asp

%
Class debuggingConsole

private dbg_Enabled
private dbg_Show
private dbg_RequestTime
private dbg_FinishTime
private dbg_Data
private dbg_DB_Data
private dbg_AllVars
private dbg_Show_default
private DivSets(2)

''Construktor => set the default values
Private Sub Class_Initialize()
dbg_RequestTime = Now()
dbg_AllVars = false
Set dbg_Data = Server.CreateObject("Scripting.Dictionary")
DivSets(0) = "TR>TD style=''cursor:hand;'' onclick=""javascript:if (document.getElementById(''data#sectname#'').style.display==''none''){document.getElementById(''data#sectname#'').style.display=''block'';}else{document.getElementById(''data#sectname#'').style.display=''none'';}"">DIV id=sect#sectname# style=""font-weight:bold;cursor:hand;background:#7EA5D7;color:white;padding-left:4;padding-right:4;padding-bottom:2;"">|#title#| DIV id=data#sectname# style=""cursor:text;display:none;background:#FFFFFF;padding-left:8;"" onclick=""window.event.cancelBubble = true;"">|#data#| /DIV>|/DIV>|"
DivSets(1) = "TR>TD>DIV id=sect#sectname# style=""font-weight:bold;cursor:hand;background:#7EA5D7;color:white;padding-left:4;padding-right:4;padding-bottom:2;"" onclick=""javascript:if (document.getElementById(''data#sectname#'').style.display==''none''){document.getElementById(''data#sectname#'').style.display=''block'';}else{document.getElementById(''data#sectname#'').style.display=''none'';}"">|#title#| DIV id=data#sectname# style=""cursor:text;display:block;background:#FFFFFF;padding-left:8;"" onclick=""window.event.cancelBubble = true;"">|#data#| /DIV>|/DIV>|"
DivSets(2) = "TR>TD>DIV id=sect#sectname# style=""background:#7EA5D7;color:lightsteelblue;padding-left:4;padding-right:4;padding-bottom:2;"">|#title#| DIV id=data#sectname# style=""display:none;background:lightsteelblue;padding-left:8"">|#data#| /DIV>|/DIV>|"
dbg_Show_default = "0,0,0,0,0,0,0,0,0,0,0"
End Sub

Public Property Let Enabled(bNewValue) ''''[bool] Sets "enabled" to true or false
dbg_Enabled = bNewValue
End Property
Public Property Get Enabled ''''[bool] Gets the "enabled" value
Enabled = dbg_Enabled
End Property

Public Property Let Show(bNewValue) ''''[string] Sets the debugging panel. Where each digit in the string represents a debug information pane in order (11 of them). 1=open, 0=closed
dbg_Show = bNewValue
End Property
Public Property Get Show ''''[string] Gets the debugging panel.
Show = dbg_Show
End Property

Public Property Let AllVars(bNewValue) ''''[bool] Sets wheather all variables will be displayed or not. true/false
dbg_AllVars = bNewValue
End Property
Public Property Get AllVars ''''[bool] Gets if all variables will be displayed.
AllVars = dbg_AllVars
End Property

''******************************************************************************************************************
''''@SDESCRIPTION: Adds a variable to the debug-informations.
''''@PARAM: - label [string]: Description of the variable
''''@PARAM: - output [variable]: The variable itself
''******************************************************************************************************************
Public Sub Print(label, output)
If dbg_Enabled Then
if err.number > 0 then
call dbg_Data.Add(ValidLabel(label), "!!! Error: "  err.number  " "  err.Description)
err.Clear
else
uniqueID = ValidLabel(label)
response.write uniqueID
call dbg_Data.Add(uniqueID, output)
end if
End If
End Sub

''******************************************************************************************************************
''* ValidLabel
''******************************************************************************************************************
Private Function ValidLabel(byval label)
dim i, lbl
i = 0
lbl = label
do
if not dbg_Data.Exists(lbl) then exit do
i = i + 1
lbl = label  "("  i  ")"
loop until i = i

ValidLabel = lbl
End Function

''******************************************************************************************************************
''* PrintCookiesInfo
''******************************************************************************************************************
Private Sub PrintCookiesInfo(byval DivSetNo)
dim tbl, cookie, key, tmp
For Each cookie in Request.Cookies
If Not Request.Cookies(cookie).HasKeys Then
tbl = AddRow(tbl, cookie, Request.Cookies(cookie)) 
Else
For Each key in Request.Cookies(cookie)
tbl = AddRow(tbl, cookie  "("  key  ")", Request.Cookies(cookie)(key)) 
Next
End If
Next

tbl = MakeTable(tbl)
if Request.Cookies.count = 0 then DivSetNo = 2
tmp = replace(replace(replace(DivSets(DivSetNo),"#sectname#","COOKIES"),"#title#","COOKIES"),"#data#",tbl)
Response.Write replace(tmp,"|", vbcrlf)
end sub

''******************************************************************************************************************
''* PrintSuMMaryInfo
''******************************************************************************************************************
Private Sub PrintSummaryInfo(byval DivSetNo)
dim tmp, tbl
tbl = AddRow(tbl, "Time of Request",dbg_RequestTime)
tbl = AddRow(tbl, "Elapsed Time",DateDiff("s", dbg_RequestTime, dbg_FinishTime)  " seconds")
tbl = AddRow(tbl, "Request Type",Request.ServerVariables("REQUEST_METHOD"))
tbl = AddRow(tbl, "Status Code",Response.Status)
tbl = AddRow(tbl, "Script Engine",ScriptEngine  " "  ScriptEngineMajorVersion  "."  ScriptEngineMinorVersion  "."  ScriptEngineBuildVersion)
tbl = MakeTable(tbl)
tmp = replace(replace(replace(DivSets(DivSetNo),"#sectname#","SUMMARY"),"#title#","SUMMARY INFO"),"#data#",tbl)
Response.Write replace(tmp,"|", vbcrlf)
End Sub

''******************************************************************************************************************
''''@SDESCRIPTION: Adds the Database-connection object to the debug-instance. To display Database-information
''''@PARAM: - oSQLDB [object]: connection-object
''******************************************************************************************************************
Public Sub GrabDatabaseInfo(byval oSQLDB)
dbg_DB_Data = AddRow(dbg_DB_Data, "ADO Ver",oSQLDB.Version)
dbg_DB_Data = AddRow(dbg_DB_Data, "OLEDB Ver",oSQLDB.Properties("OLE DB Version"))
dbg_DB_Data = AddRow(dbg_DB_Data, "DBMS",oSQLDB.Properties("DBMS Name")  " Ver: "  oSQLDB.Properties("DBMS Version"))
dbg_DB_Data = AddRow(dbg_DB_Data, "Provider",oSQLDB.Properties("Provider Name")  " Ver: "  oSQLDB.Properties("Provider Version"))
End Sub

''******************************************************************************************************************
''* PrintDatabaseInfo
''******************************************************************************************************************
Private Sub PrintDatabaseInfo(byval DivSetNo)
dim tbl
tbl = MakeTable(dbg_DB_Data)
tbl = replace(replace(replace(DivSets(DivSetNo),"#sectname#","DATABASE"),"#title#","DATABASE INFO"),"#data#",tbl)
Response.Write replace(tbl,"|", vbcrlf)
End Sub

''******************************************************************************************************************
''* PrintCollection
''******************************************************************************************************************
Private Sub PrintCollection(Byval Name, ByVal Collection, ByVal DivSetNo, ByVal ExtraInfo)
Dim vItem, tbl, Temp
For Each vItem In Collection
if isobject(Collection(vItem)) and Name > "SERVER VARIABLES" and Name > "QUERYSTRING" and Name > "FORM" then
tbl = AddRow(tbl, vItem, "{object}")
elseif isnull(Collection(vItem)) then
tbl = AddRow(tbl, vItem, "{null}")
elseif isarray(Collection(vItem)) then
tbl = AddRow(tbl, vItem, "{array}")
else
if dbg_AllVars then
tbl = AddRow(tbl, "nobr>"  vItem  "/nobr>", server.HTMLEncode(Collection(vItem)))
elseif (Name = "SERVER VARIABLES" and vItem > "ALL_HTTP" and vItem > "ALL_RAW") or Name > "SERVER VARIABLES" then
if Collection(vItem) > "" then
tbl = AddRow(tbl, vItem, server.HTMLEncode(Collection(vItem))) ''  " {"  TypeName(Collection(vItem))  "}")
else
tbl = AddRow(tbl, vItem, "...")
end if
end if
end if
Next
if ExtraInfo > "" then tbl = tbl  "TR>TD COLSPAN=2>HR>/TR>"  ExtraInfo
tbl = MakeTable(tbl)
if Collection.count = 0 then DivSetNo =2
tbl = replace(replace(DivSets(DivSetNo),"#title#",Name),"#data#",tbl)
tbl = replace(tbl,"#sectname#",replace(Name," ",""))
Response.Write replace(tbl,"|", vbcrlf)
End Sub

''******************************************************************************************************************
''* AddRow
''******************************************************************************************************************
Private Function AddRow(byval t, byval var, byval val)
t = t  "|TR valign=top>|TD>|"  var  "|TD>= "  val  "|/TR>"
AddRow = t
End Function

''******************************************************************************************************************
''* MakeTable
''******************************************************************************************************************
Private Function MakeTable(byval tdata)
tdata = "|table border=0 style=""font-size:10pt;font-weight:normal;"">" + tdata + "/Table>|"
MakeTable = tdata
End Function

''******************************************************************************************************************
''''@SDESCRIPTION: Draws the Debug-panel
''******************************************************************************************************************
Public Sub draw()
If dbg_Enabled Then
dbg_FinishTime = Now()

Dim DivSet, x
DivSet = split(dbg_Show_default,",")
dbg_Show = split(dbg_Show,",")

For x = 0 to ubound(dbg_Show)
divSet(x) = dbg_Show(x)
Next

Response.Write "BR>Table width=100% cellspacing=0 border=0 style=""font-family:arial;font-size:9pt;font-weight:normal;"">TR>TD>DIV style=""background:#005A9E;color:white;padding:4;font-size:12pt;font-weight:bold;"">Debugging-console:/DIV>"
Call PrintSummaryInfo(divSet(0))
Call PrintCollection("VARIABLES", dbg_Data,divSet(1),"")
Call PrintCollection("QUERYSTRING", Request.QueryString(), divSet(2),"")
Call PrintCollection("FORM", Request.Form(),divSet(3),"")
Call PrintCookiesInfo(divSet(4))
Call PrintCollection("SESSION", Session.Contents(),divSet(5),AddRow(AddRow(AddRow("","Locale ID",Session.LCID  " (H"  Hex(Session.LCID)  ")"),"Code Page",Session.CodePage),"Session ID",Session.SessionID))
Call PrintCollection("APPLICATION", Application.Contents(),divSet(6),"")
Call PrintCollection("SERVER VARIABLES", Request.ServerVariables(),divSet(7),AddRow("","Timeout",Server.ScriptTimeout))
Call PrintDatabaseInfo(divSet(8))
Call PrintCollection("SESSION STATIC OBJECTS", Session.StaticObjects(),divSet(9),"")
Call PrintCollection("APPLICATION STATIC OBJECTS", Application.StaticObjects(),divSet(10),"")
Response.Write "/Table>"
End If
End Sub

''Destructor
Private Sub Class_Terminate()
Set dbg_Data = Nothing
End Sub

End Class

%>

類的說明:
CLASS debuggingConsole
Version: 1.2



Public Properties
Property Let Enabled(bNewValue) [bool] Sets "enabled" to true or false
Property Get Enabled [bool] Gets the "enabled" value
Property Let Show(bNewValue) [string] Sets the debugging panel. Where each digit in the string represents a debug information pane in order (11 of them). 1=open, 0=closed
Property Get Show [string] Gets the debugging panel.
Property Let AllVars(bNewValue) [bool] Sets wheather all variables will be displayed or not. true/false
Property Get AllVars [bool] Gets if all variables will be displayed.

Public Methods
public sub Print (label, output)
Adds a variable to the debug-informations.
public sub GrabDatabaseInfo (byval oSQLDB)
Adds the Database-connection object to the debug-instance. To display Database-information
public sub draw ()
Draws the Debug-panel

Methods Detail

public sub Print (label, output)
Parameters: - label [string]: Description of the variable
- output [variable]: The variable itself

public sub GrabDatabaseInfo (byval oSQLDB)
Parameters: - oSQLDB [object]: connection-object
您可能感興趣的文章:
  • Java關于遠程調試程序教程(以Eclipse為例)
  • C#中利用斷點操作調試程序的步驟詳解
  • IOS 使用NSAssert()和NSParameterAssert調試程序
  • Python中使用PDB庫調試程序
  • ubuntu用wifi連接android調試程序的步驟
  • Android開發筆記之:一分鐘學會使用Logcat調試程序的詳解
  • 用bat實現刪除系統腳本調試程序
  • asp:debug類調試程序
  • Linux應用程序使用寫文件調試程序的方法

標簽:泰州 咸陽 麗江 鐵嶺 昆明 家電維修 溫州 昌都

巨人網絡通訊聲明:本文標題《asp下調試程序的debug類》,本文關鍵詞  asp,下,調試,程序,的,debug,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《asp下調試程序的debug類》相關的同類信息!
  • 本頁收集關于asp下調試程序的debug類的相關信息資訊供網民參考!
  • 推薦文章
    欧美阿v视频在线大全_亚洲欧美中文日韩V在线观看_www性欧美日韩欧美91_亚洲欧美日韩久久精品
  • <rt id="w000q"><acronym id="w000q"></acronym></rt>
  • <abbr id="w000q"></abbr>
    <rt id="w000q"></rt>
    亚洲国产一二三| 星空大象在线观看免费播放| 午夜国产小视频| 国产色爱av资源综合区| 久久精品二区亚洲w码| 内射中出日韩无国产剧情| 制服丝袜中文字幕一区| 亚洲sss视频在线视频| 日本黄色大片在线观看| 欧美日韩一区在线观看| 一区二区国产盗摄色噜噜| 少妇丰满尤物大尺度写真| 日韩影院一区二区| 亚洲欧美综合色| 成人avav影音| 日本精品一级二级| 一区二区三区四区激情| 91猫先生在线| 欧美久久高跟鞋激| 日韩高清在线观看| 国产黄片一区二区三区| 久久久亚洲精华液精华液精华液| 国产在线播放一区二区三区| 97精品在线播放| 国产精品国产a级| 99精品视频一区二区| 欧美视频日韩视频在线观看| 亚洲成人激情av| 中文精品在线观看| 久久亚洲一区二区三区明星换脸| 国产精品亚洲视频| 18岁成人毛片| 亚洲精品成人少妇| 99久久人妻精品免费二区| 精品乱人伦一区二区三区| 国产一区二区主播在线| 性欧美videos| 亚洲不卡在线观看| 亚洲精品视频久久久| 欧美国产丝袜视频| 91亚洲精品久久久蜜桃| 8v天堂国产在线一区二区| 免费视频最近日韩| 蜜桃av免费观看| 亚洲丝袜美腿综合| 精品久久久久一区二区| 精品免费日韩av| 成人午夜伦理影院| 欧美日韩国产片| 久久精品国产成人一区二区三区| 懂色av懂色av粉嫩av| 午夜精品一区二区三区免费视频| 亚洲一区二区自偷自拍| 1024精品合集| 国产精品久久无码| 欧美国产一区二区在线观看| 人妻 丝袜美腿 中文字幕| 久久久久久亚洲综合| 91丝袜美女网| 2024国产精品视频| 91在线视频在线| 精品久久久久av影院 | 韩国精品久久久| 91传媒视频在线播放| 热久久国产精品| 色综合久久久网| 免费av网站大全久久| 一本久久a久久免费精品不卡| 日韩精品国产精品| 欧产日产国产v| 毛片av一区二区| 欧美性色黄大片手机版| 国产伦精品一区二区三区视频青涩| 欧美综合天天夜夜久久| 国产一区999| 欧美一区二区三区爱爱| 成人久久18免费网站麻豆 | 日韩免费av一区| 五月婷婷激情综合网| 丝袜美腿小色网| 久久精品国产亚洲a| 欧美亚洲精品一区| 国产精品亚洲视频| 日韩免费观看2025年上映的电影| 99久久婷婷国产| 国产亚洲成aⅴ人片在线观看| 亚洲中文字幕无码一区| 国产精品久久久久国产精品日日| 日韩人妻一区二区三区| 一区二区三区在线播放| 国产传媒免费在线观看| 久久精品国产亚洲5555| 正在播放一区二区| 91麻豆文化传媒在线观看| 亚洲国产高清aⅴ视频| 国产女主播喷水高潮网红在线| 亚洲一二三专区| 欧美卡一卡二卡三| 国产麻豆视频一区二区| 欧美大片免费久久精品三p| 91精品啪在线观看国产| 亚洲人成7777| 神马久久精品综合| 国产乱子伦视频一区二区三区| 日韩美女在线视频| 美女扒开腿免费视频| 亚洲精品成人在线| 色综合久久综合网97色综合| 国产精品一二三区在线| 国产亚洲欧洲997久久综合| 亚洲av无码国产精品麻豆天美| 香蕉影视欧美成人| 欧美日韩美女一区二区| 91片黄在线观看| 亚洲视频在线观看一区| 国产女人被狂躁到高潮小说| 国产91在线看| 中文字幕电影一区| 人人艹在线视频| 国产精品自拍网站| 久久精品视频在线看| 超薄肉色丝袜一二三| 精品一区二区久久| 精品久久一区二区三区| 色婷婷av777| 久久精品99国产精品| 久久综合国产精品| 国产sm调教视频| 国内精品免费**视频| 久久久午夜精品理论片中文字幕| 摸摸摸bbb毛毛毛片| 国产乱一区二区| 国产精品久久久久久户外露出 | 国产精品一区二区在线免费观看| 亚洲一区二区免费视频| 欧美日韩国产影片| 久久免费精品国产| 丝袜亚洲另类丝袜在线| 欧美一二三区在线| 成人性生交大免费看| 精东粉嫩av免费一区二区三区| 久久久久99精品国产片| 免费精品在线视频| jiyouzz国产精品久久| 一区二区三区视频在线观看| 欧美日本高清视频在线观看| 好吊色视频一区二区三区| 捆绑调教一区二区三区| 久久九九99视频| 免费看特级毛片| 男生和女生一起差差差视频| 亚洲一区二区影院| 日韩一级精品视频在线观看| 一级片久久久久| 成人久久18免费网站麻豆| 一区二区成人在线| 日韩午夜av电影| 一二三四在线观看视频| 波多野结衣一区二区三区| 亚洲va欧美va人人爽| 亚洲精品一区二区精华| 四虎永久免费在线| 亚洲少妇中文字幕| 久久精品99国产精品日本| 国产精品久久久久久久久图文区| 在线观看三级视频欧美| 老熟妇精品一区二区三区| 国产一区 二区 三区一级| 亚洲精品高清视频在线观看| 欧美mv和日韩mv国产网站| 亚洲 欧美 变态 另类 综合| 白丝校花扒腿让我c| 久久99久久99精品免视看婷婷 | 秋霞影院一区二区| 欧美激情综合在线| 欧美色图激情小说| 成人午夜剧场视频网站| 99国产精品国产精品毛片| 日韩av电影天堂| 国产精品国产三级国产有无不卡| 欧美精品乱人伦久久久久久| 亚洲熟女少妇一区二区| 69xxx免费视频| 国产成a人亚洲精品| 亚洲成人久久影院| 国产精品私房写真福利视频| 欧美一区二区三区在线电影| 国产高清视频免费在线观看| 特级特黄刘亦菲aaa级| 国产91丝袜在线播放九色| 偷拍亚洲欧洲综合| 亚洲欧洲一区二区三区| 日韩免费观看高清完整版 | 国产69精品一区二区亚洲孕妇| 香蕉乱码成人久久天堂爱免费| 国产精品久久久久一区二区三区| 欧美一级精品大片| 日本福利一区二区| 成人黄色a级片| 95视频在线观看|