Back

System.NullReferenceException when setting "environment": "backtesting-desktop" - trying to locally debug using Visual studio 2017

Good morning,

I am trying to locally debug the simple, default algorithm in C#.  I am trying to get a debug point to hit on 

public override void OnData(Slice data)

in the BasicTemplateAlgorithm.cs class.

I followed the instructions here, entered my api information, installed the plugin, and able to submit/view backtests correctly, but the tutorial does not seem to address actually hitting a breakpoint.  In fact it even breaks on Debugger.Break() in DebuggerHelper.cs ,but not anywhere in BasicTemplateAlgorithm.cs 

https://www.quantconnect.com/tutorials/open-source/backtesting-from-visual-studio

I then started trying to follow the youtube tutorials here, but I get  "System.NullReferenceException when setting "environment": "backtesting-desktop".  

https://www.youtube.com/watch?v=m6llfznP4d4

I saw some mention that equities are not supported and it looks like Views have been removed from the code.  So I wonder if the above video is outdated ?

Any advice is appreciated.  Again just trying to breakpoint on OnData().

Update Backtest







0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


backtesting-desktop is not supported at this time.  I was able to get into debug mode on OnData() by updating "algorithm-type-name" to the algorithm I was actually using the breakpoint on. :)

0

Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed