Page 1 of 1

ERROR : "Enable to evaluate the expression" on breakpoint

Posted: Aug 05 2012
by Emmanuel
Hi

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
Can you read in Visual Studio the value of Close ?

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: Aug 06 2012
by Henry MultiСharts
Hello Emmanuel,

This issue is confirmed. It will be fixed in one of the future versions of MultiCharts .Net

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: Aug 06 2012
by Emmanuel
Henry,

BIG Thank you for your answer !!!!

Do you know when this issue will fix ? When will be the future issue of Multicharts .NET ?

Emmanuel

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: Aug 07 2012
by Henry MultiСharts
Unfortunately there is no ETA at the moment.

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: Aug 23 2012
by Emmanuel
Hi,

We hope this bug is not forgotten , we are waiting after this solution in the next release, we need to evaluate variable under VB

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: Aug 24 2012
by Henry MultiСharts
Hello Emmanuel,

Our developers are currently working on the fix for this issue.
It should become available for public in about two weeks or less.

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: Aug 27 2012
by Emmanuel
Hello Henry

This is a very good news !!!!

Thank you very much .

Emmanuel

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: Aug 27 2012
by Henry MultiСharts
During our further investigation we have found out that this issue is caused by Visual Studio 2010.
Here is the link to MS bug report.
You can use the workaround provided on the link above or use Visual Studio 2008 to avoid this issue with VS2010.

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: Aug 27 2012
by Emmanuel
Hi Henry

The solution of the link propose : 1. Rebuild solution , 2. Restart Visual Studio

Of course we try it many time and it don't work.The error is the same and stay.

It is not because of VS 2010, I have the same error with VS 2008 and VS 2012

If it was because of VS, why would it work with C# and not VB ?

We still have this error with VS 2012.

This link is not the solution, this is for sure.




Emmanuel

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: Aug 28 2012
by Henry MultiСharts
Emmanuel, are you compiling with Debug or Release selected in editor?
On our end it works ok with Debug selected.

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: Aug 28 2012
by Emmanuel
Henry, I compile with Debug selected in editor.

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: Aug 28 2012
by Emmanuel
Hi Henry,

When you "attach to process", What type of code to debug ?

is it "Managed"(v2.0, v1.1,v1.0) code ?

(please see attachement)

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: Aug 30 2012
by Henry MultiСharts
When you "attach to process", What type of code to debug ?
is it "Managed"(v2.0, v1.1,v1.0) code ?
Yes that is correct, you need to select "Managed" code.
I have tried to attach Visual studio 2008 to MultiCharts .Net 32bit/64bit using VB .Net code and debugging works fine, I do not have "Enable to evaluate the expression" error or any other problem on both versions.

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: Aug 31 2012
by Emmanuel
Henry,

I try with VS 2008 and I get the same error "Unable to evaluate expression"

If go to "Autos" like you , I have nothing , no variable.

(see attachement)

Do you have the same reference like us ? (capture.jpg)

Emmanuel

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: Aug 31 2012
by Henry MultiСharts
Emmanuel, have you tried to change the status of the study on the chart on-off-on while you are attached to process (Format->Study->Studies->Status)?

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: Sep 05 2012
by Emmanuel
Emmanuel, have you tried to change the status of the study on the chart on-off-on while you are attached to process (Format->Study->Studies->Status)?
Hi Henry,

No, I didn't try to change the status,

I installed MC.NET 32 bits I have same message "unable to evaluate ..."

But I have a question :

I am using Windows 7 Pro 64 Bits, with Multicharts. NET 64 bits ,

1/ Which version of windows are you using with MC.NET ? is it windows 7, is it Vista ? is it 64 bits ?

2/ Are you using MC.NET 64 bits or 32 bits ?

3/ Maybe should I remove the Standard edition of MC ?

Emmanuel

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: Sep 05 2012
by Henry MultiСharts
Hello Emmanuel,
1/ Which version of windows are you using with MC.NET ? is it windows 7, is it Vista ? is it 64 bits ?
It is Windows 7 Enterprise 64 bits on my PC.
2/ Are you using MC.NET 64 bits or 32 bits ?
I have tried both versions-both work fine.
3/ Maybe should I remove the Standard edition of MC ?
That should not be the issue. I have three regular MC installed on my PC alongside with two MC .Net
No, I didn't try to change the status
Please try to change the status of the study on the chart on-off-on while you are attached to process (Format->Study->Studies->Status). If this does not help - please come to our live chat Monday - Friday 6.30 am - 11 am EST and we will try to help you remotely.

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: Sep 10 2012
by Henry MultiСharts
VS 2008 was installed on Emmanuel's PC and the problem is solved now.

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: Sep 10 2012
by Emmanuel
Henry

THANK YOU SO MUCH !!!!!!!!!!

Thank you for taking care, Thank you for taking the time, Thank you for your effort each time
we ask.

THANK YOU SO MUCH !!!!!!!!!!

Not only you are developping the best product , but you are offering the best support each time !!!!!

The world must know this !!!!!

Emmanuel

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: Sep 28 2012
by Emmanuel
Hi,

I tested Beta Version 64-bit Version: 8.1.6047 Beta 1,

And we are still not able to "evaluate the expression on breakpoint" with visual Studio 2010

with the Beta version 8.1.

In fact the breakpoint don't even break on the Sub CalcBar()

VS 2010 stop on the Sub New but not anymore on Sub CalcBar(), so we still are unable to evaluate the expression.

Do you think this issue will be solve with MC .NET 8.1 ?

Beat Regards,

Emmanuel

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: Oct 02 2012
by Henry MultiСharts
Emmanuel, this issue is caused by Visual Studio 2010. You need to use Visual Studio 2008.

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: Dec 10 2012
by Emmanuel
Hi ,

We are using, visual studio 2008 , but Visual Studio 2008 is clearly obsolete :

We need absolutely to use Visual Studio 2010, with its multithreading possibility.

Will this issue be solved on Multicharts 8.5 beta ?

Please, we are waiting for this important issue to be solve

Emmanuel

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: Dec 10 2012
by Henry MultiСharts
Emmanuel, as I wrote before - this issue is caused by Visual Studio 2010. You need to use Visual Studio 2008. There is nothing working incorrectly in MultiCharts.

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: Dec 10 2012
by Emmanuel
Hi Henry,

I understand,

Did you know that Multicharts .NET have the same issue with Visual Studio 2012 ?

Did Multicharts report this bug to Microsoft ?

This issue can't last for ever . We have to find a solution,

VS 2008 is clearly obsolete.


Best Regards ,

Emmanuel

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: Jan 31 2013
by Henry MultiСharts
Hi Henry,
I understand,
Did you know that Multicharts .NET have the same issue with Visual Studio 2012 ?
Hello Emmanuel,

We do not have such issue in our environment.
Please come to our live chat Monday Friday 6.30am-11am EST to demonstrate the issue to one of our .Net specialists.

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: Feb 01 2013
by Emmanuel
Hi Henry

I tested this morning again MC Beta 2, with VS 2012,

and I am still enable to evaluate the expression on breakpoint under VB

On internet, I red few months ago, that this error could be because, "Native" was unchecked, when I attached the process (See attached Capture1.jpg)

But when I check "Native", I get an error message , "Unable to attach to process, Mixed mode debugging .... with Framework earlier than 4.0 "see file Attached "Capture.jpg"

My computer is available any time for testing.

I will you contact you monday


Emmanuel

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: Feb 01 2013
by Henry MultiСharts
Emmanuel, when your project is .Net Framework 3.5 you can use either "Managed" or "Native" debugging mode.

VB .Net code should be always debugged in "Managed" mode.

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: Feb 01 2013
by Emmanuel
Hi Henry

If I try Native only, Multicharts won't stop on the breakpoint

MC .NET will draw the indicator without stoping on the breakpoint

MC .Net will stop only if I leave in Automatic

But then , I get : " unable to evaluate the expression."

Emmanuel

ERROR : "Enable to evaluate the expression" on breakpoint

Posted: Mar 04 2013
by Emmanuel
Hi

I tried the new Multicharts 8.5 Release Candidate, and the challenge is still there

I can see that we compile with .NET Framework 4.0, but as you can see with the attached file,

we can not still "Enable to evaluate the expression" on breakpoint.

As we tried with , Henry, earlier , we have the same problem, with VS 2010 as with VS 2012.

Emmanuel

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: Mar 05 2013
by Henry MultiСharts
Hello Emmanuel,

As I wrote before - this issue is caused by Visual Studio 2010/2012. This has nothing to do with MultiCharts .Net.
Here is the bug report to Microsoft: Unable to evaluate the expression using Visual Basic .Net in VS 2010/12

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: Mar 06 2013
by Emmanuel
Hi Henry, Hi Dave,


I see that the new MC 8.5 RC seem not anymore compatible with VS 2008

viewtopic.php?f=19&t=12780&p=60271#p60271

Which mean that we won't be able to evaluate expression on breakpoint.


We have a solution : The VB indicator of C#indicator, or functionVB of functionC# , (already requested before)

We will be able stop on breakpoint in Function C#, to be able to watch variable.

If we have indicator of indicator ,we will have an infinity of possibility for MC .NET.
(Example Average of RSI , Etc...)

You will solve two problem at once, It is clear, it will make a udge difference in possibility for MC.NET

Emmanuel

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: Mar 08 2013
by Henry MultiСharts
Solution has been provided here:
Here is what we can recommend you to do while MS is checking our bug report (Unable to evaluate the expression):
For example you have a class MyIndicator. It inherits from Indicator object at the moment.
You can create your own assembly(dll) where you will implement all your logic.
In the dll class MyIndicImp should inherit from Indicator object.
In the PL .Net study you need to add reference to this dll and make class MyIndicator inherit from dll class MyIndicImp. In this case you should be able to debug your VB codes in VS 2010/12.

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: Mar 08 2013
by Emmanuel
:) :) :) :) THANK YOU HENRY !!! :) :) :) :)

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: May 10 2013
by Henry MultiСharts
Here is Microsoft reply for our bug report:
We took a closer look and found that our understanding of the problem was wrong. We hadn't noticed that your repro project actually produces and consumed a VB-authored netmodule. Upon investigation, we found that we had indeed broken debugging for VB netmodules in Visual Studio 2010, but they are so rare that this bug hadn't been reported (or we hadn't recognized the report for what it was).

We have now *fixed* this issue for the next major release of Visual Studio. I sincerely apologize for the inconvenience this has caused you.
I have also asked for a hotfix or estimated release time:
I can't share ship dates, but we are far enough along in the next product cycle that it is unlikely that we'll be able to produce a hot fix for this problem.

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: May 10 2013
by Emmanuel
Hello Henry,

This is excellent news !!! we have an answer !!!!! :)

(This bug is really annoying.)

Thank you very much for asking an hotfix,

Now , Microsoft, will fix this bug for sure !!!!

Thank you very much for your persistence .

This is because of the quality of your work that Multicharts is the Best !!!!!!

THANK YOU TO ALL OF YOU at multicharts !!!!

Multicharts is the BEST Software because your team is the best !!!!!!

Please, continue this excellent work , :)

Emmanuel

Re: ERROR : "Enable to evaluate the expression" on breakpo  [SOLVED]

Posted: Jun 01 2015
by Henry MultiСharts
We have verified that this bug is now fixed in Visual Studio 2013.

Re: ERROR : "Enable to evaluate the expression" on breakpo

Posted: Jun 01 2015
by Emmanuel
Thank you Henry and to all Multicharts team !!!!

Emmanuel