No squiggly lines for build errors Vs Code

User avatar
gunar.kroeger
Posts: 143
Joined: Fri Jul 27, 2018 6:48 pm

No squiggly lines for build errors Vs Code

Postby gunar.kroeger » Tue Mar 24, 2020 2:32 pm

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.
"Running was invented in 1612 by Thomas Running when he tried to walk twice at the same time."

boarchuz
Posts: 606
Joined: Tue Aug 21, 2018 5:28 am

Re: No squiggly lines for build errors Vs Code

Postby boarchuz » Wed Mar 25, 2020 1:36 am

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

User avatar
gunar.kroeger
Posts: 143
Joined: Fri Jul 27, 2018 6:48 pm

Re: No squiggly lines for build errors Vs Code

Postby gunar.kroeger » Wed Mar 25, 2020 2:01 pm

"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
"Running was invented in 1612 by Thomas Running when he tried to walk twice at the same time."

boarchuz
Posts: 606
Joined: Tue Aug 21, 2018 5:28 am

Re: No squiggly lines for build errors Vs Code

Postby boarchuz » Wed Mar 25, 2020 3:52 pm

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

boarchuz
Posts: 606
Joined: Tue Aug 21, 2018 5:28 am

Re: No squiggly lines for build errors Vs Code

Postby boarchuz » Thu Mar 26, 2020 6:34 am

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

Who is online

Users browsing this forum: No registered users and 61 guests