繁体   English   中英

ASP.NET VB中的内联调试

[英]Inline debugging in ASP.NET VB

我有一个VB.NET应用程序,该应用程序仅具有一些我需要调试的功能(例如,在C#中断言)。 有可能吗,我该怎么做?

    Public Shared Function createNumberArrayList(ByVal startValue As Integer, _
                                             ByVal endValue As Integer, _
                                             Optional ByVal isBackwards As Boolean = False) As ArrayList
    Dim nArrayList As New ArrayList()
    If Not isBackwards Then
        For index As Integer = startValue To endValue
            nArrayList.Add(index)
        Next
    Else
        For index As Integer = endValue To startValue
            nArrayList.Add(index)
        Next
    End If
    Return nArrayList
End Function

基本上,我需要输入几个值,然后查看该函数是否工作并返回正确的ArrayList。

谢谢

声明不是特定于C#的,它是一种框架方法,因此可以在任何.NET语言中使用。 您可以执行以下操作:

Diagnostics.Debug.Assert(nArrayList.Count > 0)

编辑:

我不确定Debug.Assert是否可在ASP.NET应用程序中运行,我在网上发现了与此有关的矛盾信息。如果它不起作用, 请查看此CodeProject文章

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM