Visual Studio Code: optimized output on variable

Hi,

I am trying to debug my application wrote for nrf5340, but every time I use the debug of Visual Studio Code, every variable is unreadable and appare the sentence: "optimized out".

Can I do something to change this sentence with the real value?

Thanks

Marco

Parents
  • Hi Marco,

    Most of the SDK samples are built with compiler optimization enabled by default (i.e. CONFIG_SIZE_OPTIMIZATIONS=y) Therefore, if you haven't already done so, you can improve the debug experience by turning off optimizations. This can be done by checking the 'Enable debug options' checkbox in the build configuration, or by adding CONFIG_DEBUG_OPTIMIZATIONS=y to your prj.conf file.

    Best regards,

    Vidar

Reply
  • Hi Marco,

    Most of the SDK samples are built with compiler optimization enabled by default (i.e. CONFIG_SIZE_OPTIMIZATIONS=y) Therefore, if you haven't already done so, you can improve the debug experience by turning off optimizations. This can be done by checking the 'Enable debug options' checkbox in the build configuration, or by adding CONFIG_DEBUG_OPTIMIZATIONS=y to your prj.conf file.

    Best regards,

    Vidar

Children