如果我有如下IF语句:
If currentdate >= rating1  then
    status = 2
ELSEIF currentdate >= rating2  then
    daylight_savings_status = 0
ELSEIF currentdate >= rating3  then
    daylight_savings_status = 1
ELSE 
    daylight_savings_status = 1
End If
是否有类似javascript的东西
的console.log( '试验');
我可以测试哪个IF语句是声明的真实性?
这样我就能在firebug(firefox)上测试它.
sno*_*tis 33
对于服务器端
C#和VB.Net服务器端 - 这将显示在Visual Studio输出窗口中.
System.Diagnostics.Debug.WriteLine(log data here)
客户端JavaScript/Jquery - 这将在浏览器devtools控制台窗口中显示.适用于所有流行的浏览器.
console.log(log data here) 
如果 Console.WriteLine() 函数对您不起作用,我会尝试仅将其输出到客户端控制台。
Page.Response.Write("<script>console.log('" + msg + "');</script>");
最终,尽管您应该尝试在您自己的控制台(使用 System.Diagnostics.Debug.WriteLine(...))而不是客户端编写调试语句。
NB System.Diagnostics.Debug.WriteLine(...); 将其放入 Visual Studio 2008 中的立即窗口。
转到菜单调试 -> Windows -> 立即:
| 归档时间: | 
 | 
| 查看次数: | 50960 次 | 
| 最近记录: |