.NET

Reply
*Dale Levesque
Message 1 of 2 (73 Views)

Data Breakpoint

73 Views, 1 Replies
12-14-2005 01:58 PM
Is it possible to gewt Visual Basic .Net to break when the value of a
specific variable changes? I'm using Visual Studio 2005 and it looks like
only native C/C++ allow this.

Dale
Distinguished Contributor
fantum
Posts: 313
Registered: ‎12-06-2004
Message 2 of 2 (73 Views)

Re: Data Breakpoint

12-15-2005 04:22 AM in reply to: *Dale Levesque
Not directly as of at least .NET 2003. I don't know about 2005. However, you might switch to a property instead of a variable during testing so that you can set a break point in the property set procedure. Something like this:

[code]
#Const USE_PROPERTY = 1
#If USE_PROPERTY = 1 Then
Private _intX As Int32
Private Property intX() As Int32
Get
Return _intX
End Get
Set(ByVal Value As Int32)
_intX = Value 'break here
End Set
End Property
#End If

Private Sub SomeProc(ByVal arg As Whatever)
#If USE_PROPERTY = 0 Then
Dim intX As Int32 = 0
#End If

For Index As Int32 = 0 To 19
If Index Mod 3 = 0 Then
intX += 2
End If
Next
End Sub
[/code]
Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.