<?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>VS Code IntelliSense configuration</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/81095/vs-code-intellisense-configuration</link><description>It is great to have VS Code as IDE. Thank You. 
 Yet, I do not find a valid configuration that allows me to use IntelliSense or even simple include paths during coding. The code is build fine, no problems building. But I can not jump to a declaration</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 29 Oct 2021 16:14:07 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/81095/vs-code-intellisense-configuration" /><item><title>RE: VS Code IntelliSense configuration</title><link>https://devzone.nordicsemi.com/thread/336730?ContentTypeID=1</link><pubDate>Fri, 29 Oct 2021 16:14:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6f01da9-a6c8-4b48-8298-f65d064b18e0</guid><dc:creator>Lukas Kuhs</dc:creator><description>&lt;p&gt;Thank You for Your help, Sigurd, You pushed me into the right direction through Your attached project. I found the issue.&lt;/p&gt;
&lt;p&gt;It was an error in CMakeLists.txt, that caused this problem, i.e. the header file included in the target_sources! I removed the header file in the code I pasted above to clarify the problem, but then the problem disappeared.&lt;/p&gt;
&lt;p&gt;So this shows the problematic part:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;target_sources(app PRIVATE 
                           ...
                           include/helper.h
                           ...
                           
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;=&amp;gt; Never add a header file to the target sources.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please note, that I already had the include paths in c_cpp_properties.json set correctly, thats qhy it worked instantly once I had the file removed.&lt;/p&gt;
&lt;p&gt;By the way: This also works for opening the project as a workspace, not only as project folder, IMHO.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: VS Code IntelliSense configuration</title><link>https://devzone.nordicsemi.com/thread/336493?ContentTypeID=1</link><pubDate>Thu, 28 Oct 2021 13:07:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c93ccc3-b3d6-4373-917e-406483118c32</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
[quote user="Sigurd Hellesvik"]I am not facing this problem in my project, so it should be fixable.[/quote]
&lt;p&gt;Right, it is specifically for included files in another folder. (&amp;quot;../something&amp;quot;). If I do that, I face the same problem.&lt;/p&gt;
&lt;p&gt;I have checked with our developers, and this is a known bug. It will be fixed in a later version of our extension.&lt;/p&gt;
&lt;p&gt;As a temporary fix, you can either:&lt;/p&gt;
&lt;p&gt;Add &amp;quot;&amp;quot;${workspaceFolder}/../library_folder/**&amp;quot; to includePath in c_cpp_properties.json, given that VS code is opened to the project folder(Using &amp;quot;Open Folder...&amp;quot;).&lt;br /&gt;or&lt;br /&gt;Just open the file manually once. Then VS Code should be able to find it.&lt;/p&gt;
&lt;p&gt;Does any of these work four you?&lt;/p&gt;
&lt;p&gt;Here is the example project I used to try to replicate your issue:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/7206.test.zip"&gt;devzone.nordicsemi.com/.../7206.test.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: VS Code IntelliSense configuration</title><link>https://devzone.nordicsemi.com/thread/336236?ContentTypeID=1</link><pubDate>Wed, 27 Oct 2021 13:28:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36cdcb11-bd9e-4585-ac46-4bae63295f32</guid><dc:creator>Lukas Kuhs</dc:creator><description>&lt;p&gt;Hi Sigurd,&lt;/p&gt;
&lt;p&gt;thank You for looking into this. My main issue is the IntelliSense that does not work and all the error squiggles. I don&amp;#39;t just simply want to remove those, though.&lt;/p&gt;
&lt;p&gt;As for the image: I provided a small image of the file to make visible that Visual Studio Code shows errors everywhere, because no user written include file is accepted.&lt;/p&gt;
&lt;p&gt;I paste a small sample code image of one type and one macro from header file that builds fine but does not work in VS Code.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1635341256263v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Build works fine, nevertheless find below the CMakeLists.txt.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#
# Copyright (c) 2020 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

cmake_minimum_required(VERSION 3.13.1)

find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(udp)

# NORDIC SDK APP START
target_sources(app PRIVATE src/helper.c
                           src/main.c
                           src/transport.c
                           ${POST_CONFIGURE_FILE}
                           # some more files
                           ../otherproject/file.c
                           # some more files
)
# NORDIC SDK APP END

zephyr_include_directories(src
                           include
                           ../otherproject/include/
)
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Lukas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: VS Code IntelliSense configuration</title><link>https://devzone.nordicsemi.com/thread/336174?ContentTypeID=1</link><pubDate>Wed, 27 Oct 2021 11:28:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70e325e4-a83e-44ce-b64d-eac6a8ba4bfc</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi Lukas&lt;/p&gt;
&lt;p&gt;I am not facing this problem in my project, so it should be fixable.&lt;/p&gt;
&lt;p&gt;The image of your file is unreadable(too small). Are you able to re-upload this, maybe as a main.c file(If that is what you want to show)?&lt;/p&gt;
&lt;p&gt;A look at your CMakeLists.txt would also be useful.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>