VSCode & PlatformIO

Hello,

I’m new in VSCode & PlatformIO.
Everything seems working except a path in the problems reports.

I compile my project with SUCCES, but I have few warnings shown in PROBLEMS columns.
When I click on the file having the warning, I have message “File not found”.

When I check where the is suppose to be, it says :

~/Documents/PlatformIO/Projects/MyProjects/User/Me/Documents/PlatformIO/Projects/MyProjects/

So it’s PATH problem, it join my project path + full path. Any idea how I can solve this ?

Thanks,
Minims

Can you provide a screenshot? Does this occur on every project?

Yes, it’s some projects imported from Arduino via PlatformIO.

Can you provide the full sketch (without passwords of course) and platformio.ini?

platform.io:

[env:esp12e]
platform = espressif8266
board = esp12e
framework = arduino
monitor_speed = 115200 

and a project I have imported :

Same issue.

But the warnings from the lower screenshot are justified, they are actual compiler warnings. Can you reproduce the errors with any other project? Where do you have the MQ7.ino file from?

MQ7.ino is one of mine : MQ7

The lib I use in this code is :
Fetch URL: https://github.com/swatish17/MQ7-Library.git

I have made some errors here to have the problem. same platform.io file.

The second error have not the right path.

Could you try to convert INO to CPP? See Redirecting...

Did it help?

Hi @ivankravets, Yes it works great in this way.
So why does it fails if it’s an .ino file ?

INO is not a valid CPP format. It’s a specific file format which was developed for Wiring IDE. Later, Banzi (Arduino co-founder) stole an idea with Wiring and made a business on top of Wiring under “Arduino” label. As result, PDE (original format) was copied to INO. I recommend to read this https://arduinohistory.github.io/

In any case, I’ve just filed an issue and will add warning to PlatformIO IDE about possible issues with INO format: