Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task
EraYaN opened this issue May 18, 2016 · 2 comments
Open
1 task

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

EraYaN opened this issue May 18, 2016 · 2 comments

Comments

@EraYaN
Copy link

EraYaN commented May 18, 2016

  • 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)
@EraYaN EraYaN changed the title Visual Studio error parsing support Visual Studio error parsing support and IntelliSense (easy way) May 18, 2016
@ivankravets
Copy link
Member

See Known issues: IntelliSense Errors.

Microsoft Visual Studio doesn't allow to cutomize IntelliSense with own toolchains.

@EraYaN
Copy link
Author

EraYaN commented May 18, 2016

It does allow you to add the IncludePath and Source Directories. (In the project file)

This gives an almost complete IntelliSense experience. I know it's easy mode, but it works. It's not about the errors, it's about code completion and function prototypes. (Like this And that does add a lot to the experience. It's auto complete and refactoring is one of the reasons I use the IDE.

Other options include writing a plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants