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

Questions about MultiCharts .NET and user contributed studies.
Emmanuel
Posts: 287
Joined: 21 May 2009
Has thanked: 68 times
Been thanked: 19 times

ERROR : "Enable to evaluate the expression" on breakpoint

Postby Emmanuel » 05 Aug 2012

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 ?
Attachments
Capture.JPG
Capture.JPG (66.81 KiB) Viewed 2152 times

User avatar
Henry MultiСharts
Posts: 8479
Joined: 25 Aug 2011
Has thanked: 1211 times
Been thanked: 2720 times

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

Postby Henry MultiСharts » 06 Aug 2012

Hello Emmanuel,

This issue is confirmed. It will be fixed in one of the future versions of MultiCharts .Net
These users thanked the author Henry MultiСharts for the post:
Emmanuel

Emmanuel
Posts: 287
Joined: 21 May 2009
Has thanked: 68 times
Been thanked: 19 times

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

Postby Emmanuel » 06 Aug 2012

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

User avatar
Henry MultiСharts
Posts: 8479
Joined: 25 Aug 2011
Has thanked: 1211 times
Been thanked: 2720 times

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

Postby Henry MultiСharts » 07 Aug 2012

Unfortunately there is no ETA at the moment.
These users thanked the author Henry MultiСharts for the post:
Emmanuel

Emmanuel
Posts: 287
Joined: 21 May 2009
Has thanked: 68 times
Been thanked: 19 times

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

Postby Emmanuel » 23 Aug 2012

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

User avatar
Henry MultiСharts
Posts: 8479
Joined: 25 Aug 2011
Has thanked: 1211 times
Been thanked: 2720 times

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

Postby Henry MultiСharts » 24 Aug 2012

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.
These users thanked the author Henry MultiСharts for the post:
Emmanuel

Emmanuel
Posts: 287
Joined: 21 May 2009
Has thanked: 68 times
Been thanked: 19 times

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

Postby Emmanuel » 27 Aug 2012

Hello Henry

This is a very good news !!!!

Thank you very much .

Emmanuel

User avatar
Henry MultiСharts
Posts: 8479
Joined: 25 Aug 2011
Has thanked: 1211 times
Been thanked: 2720 times

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

Postby Henry MultiСharts » 27 Aug 2012

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.
These users thanked the author Henry MultiСharts for the post:
Emmanuel

Emmanuel
Posts: 287
Joined: 21 May 2009
Has thanked: 68 times
Been thanked: 19 times

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

Postby Emmanuel » 27 Aug 2012

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

User avatar
Henry MultiСharts
Posts: 8479
Joined: 25 Aug 2011
Has thanked: 1211 times
Been thanked: 2720 times

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

Postby Henry MultiСharts » 28 Aug 2012

Emmanuel, are you compiling with Debug or Release selected in editor?
On our end it works ok with Debug selected.
Attachments
Debug-Release.png
Debug-Release.png (9.67 KiB) Viewed 2312 times

Emmanuel
Posts: 287
Joined: 21 May 2009
Has thanked: 68 times
Been thanked: 19 times

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

Postby Emmanuel » 28 Aug 2012

Henry, I compile with Debug selected in editor.

Emmanuel
Posts: 287
Joined: 21 May 2009
Has thanked: 68 times
Been thanked: 19 times

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

Postby Emmanuel » 28 Aug 2012

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)
Attachments
Capture.JPG
Capture.JPG (75.82 KiB) Viewed 2301 times

User avatar
Henry MultiСharts
Posts: 8479
Joined: 25 Aug 2011
Has thanked: 1211 times
Been thanked: 2720 times

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

Postby Henry MultiСharts » 30 Aug 2012

Emmanuel wrote: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.
Attachments
VS8_VBNet.png
VS8_VBNet.png (135.5 KiB) Viewed 2484 times

Emmanuel
Posts: 287
Joined: 21 May 2009
Has thanked: 68 times
Been thanked: 19 times

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

Postby Emmanuel » 31 Aug 2012

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
Attachments
Capture.JPG
Capture.JPG (219.25 KiB) Viewed 2078 times
Capture6.JPG
Capture6.JPG (219.03 KiB) Viewed 1947 times
Capture5.JPG
Capture5.JPG (211.63 KiB) Viewed 2249 times
Capture4.JPG
Capture4.JPG (211.25 KiB) Viewed 2271 times

User avatar
Henry MultiСharts
Posts: 8479
Joined: 25 Aug 2011
Has thanked: 1211 times
Been thanked: 2720 times

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

Postby Henry MultiСharts » 31 Aug 2012

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)?

Emmanuel
Posts: 287
Joined: 21 May 2009
Has thanked: 68 times
Been thanked: 19 times

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

Postby Emmanuel » 05 Sep 2012

Henry MultiСharts wrote: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

User avatar
Henry MultiСharts
Posts: 8479
Joined: 25 Aug 2011
Has thanked: 1211 times
Been thanked: 2720 times

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

Postby Henry MultiСharts » 05 Sep 2012

Hello Emmanuel,

Emmanuel wrote: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.
Emmanuel wrote:2/ Are you using MC.NET 64 bits or 32 bits ?

I have tried both versions-both work fine.
Emmanuel wrote: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

Emmanuel wrote: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.

User avatar
Henry MultiСharts
Posts: 8479
Joined: 25 Aug 2011
Has thanked: 1211 times
Been thanked: 2720 times

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

Postby Henry MultiСharts » 10 Sep 2012

VS 2008 was installed on Emmanuel's PC and the problem is solved now.
These users thanked the author Henry MultiСharts for the post:
Emmanuel

Emmanuel
Posts: 287
Joined: 21 May 2009
Has thanked: 68 times
Been thanked: 19 times

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

Postby Emmanuel » 10 Sep 2012

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
These users thanked the author Emmanuel for the post (total 3):
Henry MultiСhartsStan BokovKatrin Yanenko

Emmanuel
Posts: 287
Joined: 21 May 2009
Has thanked: 68 times
Been thanked: 19 times

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

Postby Emmanuel » 28 Sep 2012

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

User avatar
Henry MultiСharts
Posts: 8479
Joined: 25 Aug 2011
Has thanked: 1211 times
Been thanked: 2720 times

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

Postby Henry MultiСharts » 02 Oct 2012

Emmanuel, this issue is caused by Visual Studio 2010. You need to use Visual Studio 2008.

Emmanuel
Posts: 287
Joined: 21 May 2009
Has thanked: 68 times
Been thanked: 19 times

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

Postby Emmanuel » 10 Dec 2012

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

User avatar
Henry MultiСharts
Posts: 8479
Joined: 25 Aug 2011
Has thanked: 1211 times
Been thanked: 2720 times

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

Postby Henry MultiСharts » 10 Dec 2012

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.

Emmanuel
Posts: 287
Joined: 21 May 2009
Has thanked: 68 times
Been thanked: 19 times

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

Postby Emmanuel » 10 Dec 2012

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

User avatar
Henry MultiСharts
Posts: 8479
Joined: 25 Aug 2011
Has thanked: 1211 times
Been thanked: 2720 times

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

Postby Henry MultiСharts » 31 Jan 2013

Emmanuel wrote: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.

Emmanuel
Posts: 287
Joined: 21 May 2009
Has thanked: 68 times
Been thanked: 19 times

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

Postby Emmanuel » 01 Feb 2013

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
Attachments
Capture.JPG
Capture.JPG (23.68 KiB) Viewed 1870 times
Capture1.JPG
Capture1.JPG (77.58 KiB) Viewed 2153 times

User avatar
Henry MultiСharts
Posts: 8479
Joined: 25 Aug 2011
Has thanked: 1211 times
Been thanked: 2720 times

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

Postby Henry MultiСharts » 01 Feb 2013

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.

Emmanuel
Posts: 287
Joined: 21 May 2009
Has thanked: 68 times
Been thanked: 19 times

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

Postby Emmanuel » 01 Feb 2013

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

Emmanuel
Posts: 287
Joined: 21 May 2009
Has thanked: 68 times
Been thanked: 19 times

ERROR : "Enable to evaluate the expression" on breakpoint

Postby Emmanuel » 04 Mar 2013

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
Attachments
Capture4.JPG
Capture4.JPG (73.24 KiB) Viewed 2298 times

User avatar
Henry MultiСharts
Posts: 8479
Joined: 25 Aug 2011
Has thanked: 1211 times
Been thanked: 2720 times

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

Postby Henry MultiСharts » 05 Mar 2013

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

Emmanuel
Posts: 287
Joined: 21 May 2009
Has thanked: 68 times
Been thanked: 19 times

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

Postby Emmanuel » 06 Mar 2013

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

User avatar
Henry MultiСharts
Posts: 8479
Joined: 25 Aug 2011
Has thanked: 1211 times
Been thanked: 2720 times

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

Postby Henry MultiСharts » 08 Mar 2013

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.
These users thanked the author Henry MultiСharts for the post:
Emmanuel

Emmanuel
Posts: 287
Joined: 21 May 2009
Has thanked: 68 times
Been thanked: 19 times

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

Postby Emmanuel » 08 Mar 2013

:) :) :) :) THANK YOU HENRY !!! :) :) :) :)

User avatar
Henry MultiСharts
Posts: 8479
Joined: 25 Aug 2011
Has thanked: 1211 times
Been thanked: 2720 times

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

Postby Henry MultiСharts » 10 May 2013

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.
These users thanked the author Henry MultiСharts for the post:
Emmanuel

Emmanuel
Posts: 287
Joined: 21 May 2009
Has thanked: 68 times
Been thanked: 19 times

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

Postby Emmanuel » 10 May 2013

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

User avatar
Henry MultiСharts
Posts: 8479
Joined: 25 Aug 2011
Has thanked: 1211 times
Been thanked: 2720 times

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

Postby Henry MultiСharts » 01 Jun 2015

We have verified that this bug is now fixed in Visual Studio 2013.
These users thanked the author Henry MultiСharts for the post:
Emmanuel

Emmanuel
Posts: 287
Joined: 21 May 2009
Has thanked: 68 times
Been thanked: 19 times

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

Postby Emmanuel » 01 Jun 2015

Thank you Henry and to all Multicharts team !!!!

Emmanuel


Return to “MultiCharts .NET”