.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Data Breakpoint

1 REPLY 1
Reply
Message 1 of 2
Anonymous
165 Views, 1 Reply

Data Breakpoint

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
1 REPLY 1
Message 2 of 2
fantum
in reply to: Anonymous

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]

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost