Debug.Assert in Studies not working  [SOLVED]

Questions about MultiCharts .NET and user contributed studies.
User avatar
orad
Posts: 121
Joined: 14 Nov 2012
Has thanked: 50 times
Been thanked: 20 times

Debug.Assert in Studies not working

Postby orad » 11 Feb 2015

I'm trying to use the Debug.Assert method in my code to detect unexpected conditions, but for some reason it is not working in the studies. I expect the following code to create a "Assertion Failed" pop-up like this one, when the study is compiled in Debug configuration.

Code: Select all

protected override void CalcBar()
{
System.Diagnostics.Debug.Assert(false, "condition failed");
}
Do you know why it is not failing and how I can make it work?

Thanks!

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Debug.Assert in Studies not working  [SOLVED]

Postby Henry MultiСharts » 12 Feb 2015

Hello orad,

Instead of Debug.Assert please show the messages using the MessageBox.


Return to “MultiCharts .NET”