翻訳者の言葉:
ASPでコードを書いている友人は、ASPで最も頭痛がしているかどうかはわかりません。そして、出力関連の出力関連が正しいかどうかを見てみましょう。数日前、私は約7つまたは8つのサブ/機能を含むページを書きました
私は今日ASPでデバッグクラス(VBS)を見て、決して試しました!
使用方法は簡単です:
test.asp
<! - #include file = debuggingconsole.asp->
<%
出力= xxxx
debugstr = new debuggingconsoleを設定します
Debugstr.Enabled = true
debugstr.print出力のprintパラメーター値、出力
'...
Debugstr.Draw
Debugstr = Nothingを設定します
%>
===================================================
DebuggingConsole.asp
<%
クラスデバッグコンドール
プライベートDBG_ENABLED
プライベートDBG_SHOW
プライベートDBG_REQUESTTIME
プライベートDBG_FINISHTIME
プライベートDBG_DATA
プライベートDBG_DB_DATA
プライベートDBG_ALLVARS
プライベートDBG_SHOW_DEFAULT
プライブディブセット(2)
'construktor =>デフォルト値を設定します
private sub class_initialize()
dbg_requesttime = now()
dbg_allvars = false
dbg_data = server.createobject(scripting.dictionary)を設定します
Divsets(0)= <tr> <td style = 'cursor:hand;' onclics:if(dacument.getelementbyid( 'data#sectname#')。 )。パディングボトム:タイトル#|データ#| < /div>
ディブセット(1)= <td> <sect#font-weight:bold:#7ea5d7; 4 4 4 {documen tbyid( 'sectname#') AME#STYLE = TEXT:block:#ffffff:8;
ディブセット(2)= <tr> <div id = sectname =#7ea5d7; | |
DBG_SHOW_DEFAULT = 0,0,0,0,0,0,0,0,0,0,0
End Sub
公共財産let let enabled(bool]セットは真またはfalseに有効になります
dbg_enabled = bnewvalue
プロパティを終了します
公有財産が有効になる '' '[bool]は有効な値を取得します
enabled = dbg_enabled
プロパティを終了します
公共の財産let show(bnewvalue) '' '[string]文字列内の各数字がデバッグ情報ペインを順番に表します(1 = open、0 =閉じます
dbg_show = bnewvalue
プロパティを終了します
公共の財産Get Show '' '[String]デバッグパネルを取得します。
show = dbg_show
プロパティを終了します
公共財産はすべての財産(bnewvalue) '' '
dbg_allvars = bnewvalue
プロパティを終了します
すべての変数が表示される場合、公共の財産を取得する '' [bool]は取得します。
allvars = dbg_allvars
プロパティを終了します
'******************************************* ******************************************** ******************************************** ******************************************** ******************************************** ************、******************************* ************ *********************
'' @sdescription:デバッグ情報に変数を追加します。
'' @param:-label [string]:変数の説明
'' @Param:-Output [変数]:変数ITSセット
'******************************************* ******************************************** ******************************************** ******************************************** ******************************************** ************、******************************* ************ *********************
パブリックサブプリント(ラベル、出力)
dbg_enabledの場合
err.Number> 0の場合
dbg_data.add(balidlabel(label)、!!! error:&err.number&&err.description)に電話してください)
err.clear
それ以外
uniqueId = validlabel(label)
Response.write uniqueId
dbg_data.add(一意)に電話してください