<?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>How to keep Bluetooth connection active while debugging / stepping through Bluetooth-handling code?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/118711/how-to-keep-bluetooth-connection-active-while-debugging-stepping-through-bluetooth-handling-code</link><description>I am using Zephyr 3.7.0 with the Nordic-provided low level link layer (LLL) code on an nRF52840-DK. I&amp;#39;d like to set a breakpoint on rp_comm_rx_decode() ( https://github.com/zephyrproject-rtos/zephyr/blob/v3.7.0/subsys/bluetooth/controller/ll_sw/ull_llcp_common</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 07 Feb 2025 16:11:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/118711/how-to-keep-bluetooth-connection-active-while-debugging-stepping-through-bluetooth-handling-code" /><item><title>RE: How to keep Bluetooth connection active while debugging / stepping through Bluetooth-handling code?</title><link>https://devzone.nordicsemi.com/thread/522023?ContentTypeID=1</link><pubDate>Fri, 07 Feb 2025 16:11:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:228f4b6e-ae7c-4013-9e90-2588c09bb915</guid><dc:creator>Jakob Ruhe</dc:creator><description>&lt;p&gt;This is not by any means specific to Zephyr or Nordic developers. You need to be creative in the embedded world since you are often closely connected to a reality which is not possible to control!&lt;/p&gt;
&lt;p&gt;Again, if you were simulating the whole system you can pause the entire simulation. In your case you have one device communicating with another device. You pause one of the devices using a breakpoint but the other device is still running and will very soon consider the connection as terminated.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to keep Bluetooth connection active while debugging / stepping through Bluetooth-handling code?</title><link>https://devzone.nordicsemi.com/thread/522014?ContentTypeID=1</link><pubDate>Fri, 07 Feb 2025 15:43:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f30db005-f8e1-4cd3-b2b9-376fe0e4fb5b</guid><dc:creator>jrr2</dc:creator><description>&lt;p&gt;Is this really how Zephyr and Nordic developers operate?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to keep Bluetooth connection active while debugging / stepping through Bluetooth-handling code?</title><link>https://devzone.nordicsemi.com/thread/521946?ContentTypeID=1</link><pubDate>Fri, 07 Feb 2025 13:27:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4cee1f15-cf68-4c8e-adde-dadd99082a46</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;In addition to what is suggested, one way of mimicking stepping in the code is to set a breakpoint, inspect, then move the breakpoint and reset, inspect, and so on. The key is to not continuing after execution has been halted (as BLE connections etc will have timed out).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to keep Bluetooth connection active while debugging / stepping through Bluetooth-handling code?</title><link>https://devzone.nordicsemi.com/thread/521827?ContentTypeID=1</link><pubDate>Thu, 06 Feb 2025 22:27:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba394ecf-3c91-42c8-9000-13dc2c870a10</guid><dc:creator>Jakob Ruhe</dc:creator><description>&lt;p&gt;I think it is not possible. Depending on exactly what you are searching for you&amp;nbsp;should&amp;nbsp;probably consider using some other approach. For example:&lt;/p&gt;
&lt;p&gt;- Increase logging level&lt;/p&gt;
&lt;p&gt;- Add more logging inside the functions if you are curious about some variables&lt;/p&gt;
&lt;p&gt;- Use a &lt;a href="https://www.nordicsemi.com/Products/Development-tools/nRF-Sniffer-for-Bluetooth-LE"&gt;Bluetooth sniffer&lt;/a&gt;&amp;nbsp;to catch traffic&lt;/p&gt;
&lt;p&gt;- Output your packets and use Wireshark to decode them.&lt;/p&gt;
&lt;p&gt;Sometimes you can run things in a simulated environment instead (for example &lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/boards/native/nrf_bsim/doc/nrf52_bsim.html"&gt;BabbleSim&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;There are many ways to debug without actually using a debugger. Good luck with the bug hunting!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>