<?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>Cannot hit breakpoint in nRF Desktop example on nRF52840</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/103757/cannot-hit-breakpoint-in-nrf-desktop-example-on-nrf52840</link><description>Environment: Windows 10, ncs 2.4.2 in VS Code. West v1.0.0 
 Hardware: nrf52840dk 
 Firmware: nrf Desktop HID example 
 
 Problem: A debug session can be started, but no breakpoints can be it 
 
 Steps: 
 I followed this guide as well as reading through</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 19 Oct 2023 14:44:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/103757/cannot-hit-breakpoint-in-nrf-desktop-example-on-nrf52840" /><item><title>RE: Cannot hit breakpoint in nRF Desktop example on nRF52840</title><link>https://devzone.nordicsemi.com/thread/451350?ContentTypeID=1</link><pubDate>Thu, 19 Oct 2023 14:44:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da54151f-7cd6-4a18-bb5b-a194ca4022ab</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Swathy is out of office. For the new questions , please open a new case.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot hit breakpoint in nRF Desktop example on nRF52840</title><link>https://devzone.nordicsemi.com/thread/446355?ContentTypeID=1</link><pubDate>Fri, 15 Sep 2023 18:24:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1265dde-b5d9-4642-95d3-7491d2a0ca25</guid><dc:creator>mrd</dc:creator><description>&lt;p&gt;Hi Swathy,&lt;/p&gt;
&lt;p&gt;Thanks for your thoughts! Selecting optimization level &amp;quot;use project default&amp;quot; rather than &amp;quot;optimize for debugging&amp;quot; does solve the problem - I can hit my breakpoint in main.c&lt;/p&gt;
&lt;p&gt;While this solves the immediate question that I posed, it doesn&amp;#39;t feel like quite the right solution. I&amp;#39;m planning to use this application as a base for further development, for which I am keenly interested in optimizing for debugging!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;1. Do you have any idea how I could change the project configuration to allow &amp;quot;optimize for debugging&amp;quot; to work? Even some suggestions for me to look into would be helpful.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Additionally, now that you&amp;#39;ve helped me with getting this running, I can use some of vs code&amp;#39;s debug controls. I notice that the &amp;quot;restart&amp;quot; option, rather than simply returning to the start of program execution, instead tries to reflash the micro, even though there are no changes to the code! It then tries to connect to the micro (which is still running?), can&amp;#39;t connect, and times out. It sounds identical to the problem seen here:&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/100611/not-possible-to-restart-debugging-without-reloading-in-vscode-nrf9160dk"&gt;Not possible to restart debugging without reloading in VSCode (nrf9160dk)&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;2. Could you confirm that no headway has been made on restarting the debug session without reflashing?&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/not-able-to-restart-dbg-session.PNG" /&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Cannot hit breakpoint in nRF Desktop example on nRF52840</title><link>https://devzone.nordicsemi.com/thread/446300?ContentTypeID=1</link><pubDate>Fri, 15 Sep 2023 13:33:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dda9eeb5-9ba1-4108-b049-62a486f347ce</guid><dc:creator>SwRa</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Could you try without enabling the &amp;quot;enable debug options&amp;quot; ? The guide you use is not quite up-to-date with the latest SDK versions and since you have the optimize for debugging options available, you are on a newer version than the ones in the guide and I would suggest you to try with the default project optimizations.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Swathy&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>