Hi all,

I hope that asking for help here will help others trying to get started using QuantConnect's Lean CLI with Visual Studio. I'm using VS 2019 Community Edition.

I'm tantilizingly close but have not yet managed to hit a breakpoint and start debugging an algorithm.

I started off following this tutorial:

https://www.quantconnect.com/docs/v2/lean-cli/getting-started/lean-cli

This was useful:

https://www.quantconnect.com/docs/v2/lean-cli/user-guides/troubleshooting

And then this:

https://www.quantconnect.com/docs/v2/lean-cli/tutorials/backtesting/debugging-local-backtests#04-C-and-Visual-Studio

In the C# and Visual Studio section of that last article, the final step is:

5) In Visual Studio, attach to the debugger using "Extensions > Mono > Attach to mono debugger".

But it feels like there should be a step 6!

When I complete step 5, my application starts. That is clear because the green "play" button in Visual Studio debugging toolbar turns into a red "stop" button. After about a minute (and without me doing anything) it stops. No errors or anything. It just stops.

And during that minute, I never hit the breakpoint set early on in my code. The breakpoint is on line 9 of Main.cs (the default, unaltered template) in:

public override void Initialize() { SetStartDate(2020, 8, 2); // Breakpoint is right here, but it isn't being hit

Nothing is written to the Output window during that time.

What have I done wrong?

Many thanks

Benjamin