When I use Visual Studio, I "attach to process", to be able to debug an indicator under multicharts .NET.
It work well under C#:
I can see in the "watch windows" to watch a value of a variable, or see "This" in the "Local variable" with all the value of the variable on a breakpoint.
BUT When I do the same, on a breakpoint, with Visual Basic (on the Following example), I have nothing under Local variable, if I "Watch" the value of a variable, I have the error message : "Enable to evaluate the expression". (See attached file)
I can go step by step in the code, the Breakpoint are working, but without evaluating the expression, I am getting "Enable to evaluate the expression (See attached file)
How can we see the value of a variable the expression on VB ? and get ride of the error message "Enable to evaluate the expression"
Here is a VB example :
Code: Select all
Imports System
Imports System.Drawing
Imports PowerLanguage
Imports PowerLanguage.Indicator
Imports PowerLanguage.Function
Imports System.Linq
Namespace PowerLanguage.Indicator
Public Class TestA
Inherits IndicatorObject
Private Test As Int16
Public Sub New(ByVal _ctx As Object)
MyBase.New(_ctx)
End Sub
Protected Overrides Sub CalcBar()
Dim Close As Double
Close = MyBase.Bars.Close.Item(0)
Me.plot1.Set(MyBase.Bars.Close.Item(0))
End Sub
Protected Overrides Sub Create()
Me.plot1 = MyBase.AddPlot(New PlotAttributes("", EPlotShapes.Line, Color.Red))
End Sub
Protected Overrides Sub StartCalc()
End Sub
Private plot1 As IPlotObject
End Class
End Namespace