Skip to content

Visual Studio error parsing support and IntelliSense (easy way) #662

Open
@EraYaN

Description

@EraYaN
  • Feature Request.

Configuration

Operating system:
Windows 10

PlatformIO Version (platformio --version):
2.9.1

Description of problem

Visual Studio displays the error in the build log, but doesn't parse them.

Steps to Reproduce

  1. Build project in visual with build errors
  2. Check Errors tab

Actual Results

Errors only contains "exited with code 1"

Expected Results

Error has a list of all errors and warnings (clickable)

If problems with PlatformIO Build System:

The content of platformio.ini:

[env:lpc1768]
platform = nxplpc
framework = mbed
board = lpc1768
targets = upload

Source file to reproduce issue:

int main(){
    -notAReaLCFILEERROR!
}

Additional info

The thing needed for this to work, is something like this: http://www.codeproject.com/Articles/370890/GCCFilter-A-script-for-compiling-with-GCC-in-Visua (But please don't use perl like that, powershell might do, or some python) I'm pretty good with python but no idea where this would need to be added.

Basically a wrapper so the output is transformed so people can click their errors.

From this:

src\main.cpp:13:8: error: errormessage

to this (replace {errorcode} with the erro code, or don't)

C:\path\to\folder\src\main.cpp(13,8): error {errorcode}: errormessage

Also add the folders with the framework to the include path of the project. This way the full IntelliSense works. (People can do this manually) This can be done by the init script. It knows the board, it can install the framework folders and add those to the project.
Mine look like this:

.\.pioenvs\lpc1768\FrameworkMbedInc-250686161\;.\.pioenvs\lpc1768\FrameworkMbedInc549023428\;.\.pioenvs\lpc1768\FrameworkMbedInc-550770547\;.\.pioenvs\lpc1768\FrameworkMbedInc1648309630\;$(IncludePath)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions