I’m not sure if this is a PIO or VSCode problem but I can’t find a solution for either. My problem is that while Breadcrumbs are showing, the complete path to the function I am in is not showing. IOW, instead of “src>main.cpp>setup()” I only see “src>main.cpp…”. If I click on the “…” I get a list or variables.
However this is only a problem with main.cpp as any other *.c or *.h file I have open the breadcrumbs work correctly.
I have the latest PIO and VSCode versions installed and have tried disabling all but the basic extensions in VSCode.
I was just about to say that I see the same behavior, that it works in
.c files but not in
.cpp files, but then I waited a bit and it showed up.
Looking through Issues · microsoft/vscode-cpptools · GitHub there’s a issue Outline/breadcrumbs takes > 30 seconds… The last comment pretty much describes the current issue.
Breadcrumbs are handled by VSCode with the C++ language extension. So you need to comment / ask there further.
In my case the full breadcrumb never shows up! Even if it were 30 sec that makes it unuseable anyway.
I’ll follow up with a new post on this issue. Is the.microsoft/vscode-cpptools the correct place?
Of course this also depends on the complexity of the project and through how many header files it has to search through, so removing all projects in the VSCode workspace except 1 may help.
I actually don’t use workspaces, just standalone projects. The problematic one is the same way but has many libraries and includes. However, if I copy the main.cpp to main.c, breadcrumbs work fine, and fast. I loaded several other complex projects and, even as main.cpp, the breadcrumbs work perfectly. The problematic project is more complex than the others.
I did find that if I create a workspace and put the problematic project in it, breadcrumbs work fine with main.cpp. There is something weird about this one project that VSCode doesn’t like!
So… here is a workaround for anyone having similar problems