Debugging and Breakpoints

Created at 01 Oct 2022, 11:07
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
CT

ctid3999979

Joined 05.07.2021

Debugging and Breakpoints
01 Oct 2022, 11:07


Hi

When I do some debugging, I set my breakpoint at the the required line that I want to stop execution. However, I have to F10 over every single line of code from the very first one of System.Diagnostics.Debugger.Launch(); in the OnStart() method.

Literally every single line.

So if I have a bot that runs on the 1 minute timeframe, and I want to debug something that's happening at 1pm for example, I have to press F10 for every line of code for for each 780 1 minute candles (currently over 300 lines of code per candle, so 234,000 time) before I get to my desired debugging point.

I thought the whole point of a breakpoint was that code would continuously execute until the breakpoint is hit?

Am I just doing something wrong because it seems absurd that this would have been made like this by design.


@ctid3999979
Replies

firemyst
01 Oct 2022, 16:47

Yes, you are missing something... seems like a quick VS tutorial is in order:

 

F5 - run until the next break point is hit

F10 - go line by line (as you're doing)

F11 - step into a method call

 

You might also want to have a read:

 


@firemyst

ctid3999979
01 Oct 2022, 17:34

RE:

firemyst said:

Yes, you are missing something... seems like a quick VS tutorial is in order:

 

F5 - run until the next break point is hit

F10 - go line by line (as you're doing)

F11 - step into a method call

 

You might also want to have a read:

 

I thought it was that. I overlooked the keyboard shortcuts and was only looking at the toolbar icons that doesn't seem to have a F5 equivalent. Thanks very much for your help. I really appreciate it.


@ctid3999979