Page 1 of 1

No squiggly lines for build errors Vs Code

Posted: Tue Mar 24, 2020 2:32 pm
by gunar.kroeger
I configured VS Code (Windows) to use the first c_cpp_propreties.json of https://github.com/espressif/vscode-esp ... URATION.md and set the Intellisense Engine to Tag Parser

I get squiggly lines for wrong includes, or wrong syntax, but I don't get them after a build if there is a build error like undeclared variable use. The problems also don't appear in the problems Tab. I'm able to work and solve the issues by looking at the line numbers in the build Output tab, but it's much slower than if I had a clickable list.

What configuration is missing? my co-workers use the same project and see the same behaviour.

Re: No squiggly lines for build errors Vs Code

Posted: Wed Mar 25, 2020 1:36 am
by boarchuz
Any reason why you're using Tag Parser?

Try removing the unix lines in your cpp_properties (the first line in each array).

Try Rescan Workspace.

Try closing and reopening Code.

Try rebuilding Intellisense db.

Follow this, try tasks.json fix mentioned or experimental feature at the very end of discussion: https://github.com/microsoft/vscode/issues/13953

Re: No squiggly lines for build errors Vs Code

Posted: Wed Mar 25, 2020 2:01 pm
by gunar.kroeger
"For this configuration to work, you need to set you C/C++ Extension Intellisense engine to Tag Parser" But I don't know why.

how do you mean "Try removing the unix lines in your cpp_properties (the first line in each array)."?

thanks

Re: No squiggly lines for build errors Vs Code

Posted: Wed Mar 25, 2020 3:52 pm
by boarchuz
Oh right, I'm not sure why it says that either. Your config is compatible with the newer 'Default' engine so I'd be using that unless I had a really good reason not to. Ignore what I said about the unix paths (I was just covering all bases but it shouldn't be a problem).

Did the last link fix the 'Problems' tab? (edit- nevermind, seems that's only for TypeScript; VS Code seems to only show problems for files that are currently open)

Undeclared variables not highlighted if includes not resolved: https://github.com/microsoft/vscode-cpp ... -493223766

Re: No squiggly lines for build errors Vs Code

Posted: Thu Mar 26, 2020 6:34 am
by boarchuz
Alright I've had a look at the Problems thing.

The Problems tab and IDF extension build command don't work together at the moment. It looks like we'll have to wait for that: https://github.com/espressif/vscode-esp ... /issues/25

In the meantime, you can use "Tasks - Run task" -> "Build - Build project" instead, which will populate Problems nicely.
I had to tweak the config for them to be clickable though, you can find the solution here if you're getting 'file not found' errors:
https://github.com/espressif/vscode-esp ... /issues/72