Unable to step into a library (.csproj) while debugging

Created at 16 Dec 2020, 21:08
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!
JE

JeanPaul

Joined 17.10.2020

Unable to step into a library (.csproj) while debugging
16 Dec 2020, 21:08


I have no issue attaching cTrader.exe to process in Visual Studio and catch all events and debug as expected. However, if I try to step into a referenced library which is also in the same solution, a .csproj with C# files, the debugger refuses to go to the function and just executes it, steps over it (obviously; I am trying to step into, not over). 

Note that I am using VS 2019 Pro Edition with the cTrader plugin installed and the cBot and the library are both in debug mode. I have tried this on three different machines with Visual Studio 2019 installed and I got the same behaviour. I have no issue stepping from a console application into a library, in other projects.

I don't remember I had this issue before and it might be a recent change in cTrader, but I am not sure.

What do I need to do to step into a library? Am I missing some option?


@JeanPaul
Replies

PanagiotisCharalampous
17 Dec 2020, 07:55

Hi JeanPaul,

This does not sound like a cTrader issue but a VS issue. I did not experience this issue before, I can step into methods without a problem. If you want to send me your project to have a look, feel free to do so.

Best Regards,

Panagiotis 

Join us on Telegram


@PanagiotisCharalampous

JeanPaul
17 Dec 2020, 13:51

RE:

PanagiotisCharalampous said:

Hi JeanPaul,

This does not sound like a cTrader issue but a VS issue. I did not experience this issue before, I can step into methods without a problem. If you want to send me your project to have a look, feel free to do so.

Best Regards,

Panagiotis 

Join us on Telegram

Thank you for the response. I solved the problem, I will leave the solution here for future reference.

Although, I was sure I was able to debug through and I did not change any option in Visual Studio 2019, however, this turned out to solve the problem:

From Visual Studio, go to Debug > Options then select "Suppress JIT optimization on module load (Managed only)" 


@JeanPaul