Code optimized in debugger

Created at 01 Aug 2022, 20:26
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!
US

userUser

Joined 13.05.2020

Code optimized in debugger
01 Aug 2022, 20:26


Dear Spotware,

When I connect debugger to 4.2 version, the code is optimized (local variables removed). 

Currently the only solution I found is using [MethodImpl(MethodImplOptions.NoOptimization)] for every required function. But it is not convenient to apply it to every function and then to remove.

Could you please advise more convenient way to avoid code optimization for debugging?


I use net framework 4.8.

Thank you!


@userUser
Replies

PanagiotisCharalampous
02 Aug 2022, 08:10

Hi there,

Do you build your code in VS in Debug mode?

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

userUser
02 Aug 2022, 18:03

RE:

PanagiotisCharalampous said:

Hi there,

Do you build your code in VS in Debug mode?

Best Regards,

Panagiotis 

Join us on Telegram and Facebook

Dear Panos,

Yes, I build the code on VS 2019 Debug mode.
PS. The only thing that changed - cTrader updated to 4.2. On cTrader 4.1 was no optimization.


@userUser

PanagiotisCharalampous
03 Aug 2022, 10:11

Hi there,

Can you check your project properties and make sure this is unchecked?

Best Regards,

Panagiotis 

Join us on Telegram and Facebook


@PanagiotisCharalampous

userUser
07 Aug 2022, 11:55 ( Updated at: 21 Dec 2023, 09:22 )

RE:

PanagiotisCharalampous said:

Hi there,

Can you check your project properties and make sure this is unchecked?

Best Regards,

Panagiotis 

Join us on Telegram and Facebook

 

Dear Panos,

Yes, this option is disabled.


@userUser