<?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>Additional source map paths for nRF Connect for VS Code</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/106959/additional-source-map-paths-for-nrf-connect-for-vs-code</link><description>Hello, 
 I have an nRF project that links a static library that is built from a separate repo my company maintains. The library is built in CI and then the archive is added to the nRF project folder to make it available for linking. I would like to step</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 29 Dec 2023 08:26:20 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/106959/additional-source-map-paths-for-nrf-connect-for-vs-code" /><item><title>RE: Additional source map paths for nRF Connect for VS Code</title><link>https://devzone.nordicsemi.com/thread/462047?ContentTypeID=1</link><pubDate>Fri, 29 Dec 2023 08:26:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:835ac527-e15a-41ca-80d5-bc1205f5e144</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Glad to hear, Mike! Always happy to help out.&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll bring this up with the vscode team internally to see if we can do something about this in the future.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;H&amp;aring;kon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Additional source map paths for nRF Connect for VS Code</title><link>https://devzone.nordicsemi.com/thread/462009?ContentTypeID=1</link><pubDate>Thu, 28 Dec 2023 16:35:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5311f817-e4c5-4f54-b27e-bf57b71de7c9</guid><dc:creator>MikeNC</dc:creator><description>&lt;p&gt;HI H&amp;aring;kon,&lt;br /&gt;&lt;br /&gt;That worked perfectly. Thanks.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Mike&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Additional source map paths for nRF Connect for VS Code</title><link>https://devzone.nordicsemi.com/thread/461999?ContentTypeID=1</link><pubDate>Thu, 28 Dec 2023 15:11:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:648cb40e-e246-4ae6-a26d-62b92fdd9e52</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi Mike,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;My setup is quite simplistic to test this.&lt;/p&gt;
&lt;p&gt;I&amp;nbsp;took zephyr/samples/application_development/external_lib and compiled/renamed the directory to &amp;quot;&lt;span&gt;zephyr/samples/application_development/external_lib&lt;strong&gt;2&lt;/strong&gt;&amp;quot;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Default debug view showed that I could not open the src file:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&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/2843.pastedimage1703775388955v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I tried to add every config I could find to my launch.json:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;{
	&amp;quot;version&amp;quot;: &amp;quot;0.2.0&amp;quot;,
	&amp;quot;configurations&amp;quot;: [
		{
			&amp;quot;type&amp;quot;: &amp;quot;nrf-connect&amp;quot;,
			&amp;quot;request&amp;quot;: &amp;quot;launch&amp;quot;,
			&amp;quot;name&amp;quot;: &amp;quot;Launch build&amp;quot;,
			&amp;quot;config&amp;quot;: &amp;quot;${workspaceFolder}/external_lib/build&amp;quot;,
			&amp;quot;runToEntryPoint&amp;quot;: &amp;quot;main&amp;quot;,
			&amp;quot;sourceFileMap&amp;quot;: { &amp;quot;/opt/ncs/zephyr/samples/application_development/external_lib&amp;quot;: &amp;quot;/opt/ncs/zephyr/samples/application_development/external_lib2&amp;quot; },
            &amp;quot;preAttachCommands&amp;quot;: [
                &amp;quot;set substitute-path /opt/ncs/zephyr/samples/application_development/external_lib /opt/ncs/zephyr/samples/application_development/external_lib2&amp;quot;,
            ],
            &amp;quot;overrideLaunchCommands&amp;quot;: [
                &amp;quot;set substitute-path /opt/ncs/zephyr/samples/application_development/external_lib /opt/ncs/zephyr/samples/application_development/external_lib2&amp;quot;,
            ],
            &amp;quot;overrideResetCommands&amp;quot;: [
                &amp;quot;set substitute-path /opt/ncs/zephyr/samples/application_development/external_lib /opt/ncs/zephyr/samples/application_development/external_lib2&amp;quot;,
            ],
            &amp;quot;overrideRestartCommands&amp;quot;: [
                &amp;quot;set substitute-path /opt/ncs/zephyr/samples/application_development/external_lib /opt/ncs/zephyr/samples/application_development/external_lib2&amp;quot;,
            ],									
		}
	]
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Still, none of the above was able to resolve to the moved directory. I am not excluding operator error from my side here, I might have fudged the syntax or something in the above.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But, I found this specific blog post (via &lt;a href="https://github.com/Marus/cortex-debug/issues/611"&gt;https://github.com/Marus/cortex-debug/issues/611&lt;/a&gt;):&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://alex.dzyoba.com/blog/gdb-source-path/"&gt;https://alex.dzyoba.com/blog/gdb-source-path/&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I played around with this function, and found that using the gdb-command was&amp;nbsp;working:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;set substitute-path ../zephyr/samples/application_development/external_lib ../zephyr/samples/application_development/external_lib2&lt;/pre&gt;&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/0272.pastedimage1703776123615v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Please note that you need to start with &lt;strong&gt;-exec&lt;/strong&gt; in the inbuild debug console in vscode:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;-exec set substitute-path /opt/ncs/zephyr/samples/application_development/external_lib /opt/ncs/zephyr/samples/application_development/external_lib2&lt;/pre&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Could you try this and see if this helps to resolve the static .a functions at your end as well?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>