<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Visual Studio Code: optimized output on variable</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/101321/visual-studio-code-optimized-output-on-variable</link><description>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: &amp;quot;optimized out&amp;quot;. 
 Can I do something to change this sentence with the real value</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 03 Jul 2023 10:18:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/101321/visual-studio-code-optimized-output-on-variable" /><item><title>RE: Visual Studio Code: optimized output on variable</title><link>https://devzone.nordicsemi.com/thread/434161?ContentTypeID=1</link><pubDate>Mon, 03 Jul 2023 10:18:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0b93e42-8ac7-41b7-9479-a4516463bd92</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Marco,&lt;/p&gt;
&lt;p&gt;The problem is that the variables you are watching are not in scope. You&amp;nbsp;expect you will see the same if you try to debug your application with Segger Ozone.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://nrfconnect.github.io/vscode-nrf-connect/guides/debug_use.html?h=ozone#how-to-start-debugging-with-ozone"&gt;https://nrfconnect.github.io/vscode-nrf-connect/guides/debug_use.html?h=ozone#how-to-start-debugging-with-ozone&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Visual Studio Code: optimized output on variable</title><link>https://devzone.nordicsemi.com/thread/434160?ContentTypeID=1</link><pubDate>Mon, 03 Jul 2023 10:12:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:41347bc1-a1be-4087-80e1-87097ce136bb</guid><dc:creator>warcomeb-am</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;Thank for your help. So, I can&amp;#39;t do anything to help my debug.&lt;/p&gt;
&lt;p&gt;Sometimes, when I use VSC, in my hearth I hope to cameback soon to the old IDEs...&lt;/p&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Marco&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Visual Studio Code: optimized output on variable</title><link>https://devzone.nordicsemi.com/thread/434103?ContentTypeID=1</link><pubDate>Mon, 03 Jul 2023 07:56:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b60bc912-86ac-45e1-8b14-98e4cffa1b0b</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Marco,&lt;/p&gt;
&lt;p&gt;This was better, thanks. I noticed that the locals are optimized away or out of scope, but I&amp;#39;m afraid there isn&amp;#39;t much that can be done about it other than placing the breakpoint where these variables are used.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Visual Studio Code: optimized output on variable</title><link>https://devzone.nordicsemi.com/thread/433761?ContentTypeID=1</link><pubDate>Thu, 29 Jun 2023 16:15:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eede9d37-9daa-4b18-a72c-e350c7a84048</guid><dc:creator>warcomeb-am</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;Sorry, now I hope the imgage is good.&lt;/p&gt;
&lt;p&gt;Best&lt;/p&gt;
&lt;p&gt;Marco&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:1040px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/2080x480/__key/communityserver-discussions-components-files/4/optimized_5F00_output.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Visual Studio Code: optimized output on variable</title><link>https://devzone.nordicsemi.com/thread/433756?ContentTypeID=1</link><pubDate>Thu, 29 Jun 2023 15:59:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0bc23be-1066-435a-97af-f90be4ce4e74</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Marco,&lt;/p&gt;
&lt;p&gt;Please try to reupload the picture with a higher resolution. I can&amp;#39;t make out what the text says.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Visual Studio Code: optimized output on variable</title><link>https://devzone.nordicsemi.com/thread/433608?ContentTypeID=1</link><pubDate>Thu, 29 Jun 2023 07:51:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1f84507-7ab2-4793-8c48-fb8b8f61e3a4</guid><dc:creator>warcomeb-am</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;in attach the screenshot.&lt;/p&gt;
&lt;p&gt;Best&lt;/p&gt;
&lt;p&gt;Marco&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/optimized_5F00_output.png_2D00_640x480.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Visual Studio Code: optimized output on variable</title><link>https://devzone.nordicsemi.com/thread/433601?ContentTypeID=1</link><pubDate>Thu, 29 Jun 2023 07:28:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db419717-5703-47f3-af96-f51325c553ec</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Marco,&lt;/p&gt;
&lt;p&gt;Some variables may still be optimized away, but it should not happen for all variables. Can you post some pictures that show this?&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Visual Studio Code: optimized output on variable</title><link>https://devzone.nordicsemi.com/thread/433592?ContentTypeID=1</link><pubDate>Thu, 29 Jun 2023 07:19:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a80359e8-b9c9-485b-bea4-71681a952419</guid><dc:creator>warcomeb-am</dc:creator><description>&lt;p&gt;Hi Vidar,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;thanks for the reply. I just have checked the &amp;quot;Enable debug options&amp;quot; checkbox.&amp;nbsp;&lt;/span&gt;Is there other way?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best&lt;/p&gt;
&lt;p&gt;Marco&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Visual Studio Code: optimized output on variable</title><link>https://devzone.nordicsemi.com/thread/433584?ContentTypeID=1</link><pubDate>Thu, 29 Jun 2023 06:47:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3fe9530b-8434-48bd-bdd5-ade12284b7c6</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi Marco,&lt;/p&gt;
&lt;p&gt;Most of the SDK samples are built with compiler optimization enabled by default (i.e.&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_SIZE_OPTIMIZATIONS"&gt;CONFIG_SIZE_OPTIMIZATIONS=y&lt;/a&gt;) Therefore, if you haven&amp;#39;t&amp;nbsp;already done so, you can improve the debug experience by turning off optimizations.&amp;nbsp;This can be done by checking the &amp;#39;Enable debug options&amp;#39; checkbox in the build configuration, or by adding CONFIG_DEBUG_OPTIMIZATIONS=y to your prj.conf file.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1688020832474v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>