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

Problems tab gets cleared after build is finished (VSC-1517) #1339

Closed
1 task done
fronders opened this issue Nov 8, 2024 · 3 comments
Closed
1 task done

Problems tab gets cleared after build is finished (VSC-1517) #1339

fronders opened this issue Nov 8, 2024 · 3 comments
Assignees
Labels
bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue) duplicate This issue or pull request already exists

Comments

@fronders
Copy link

fronders commented Nov 8, 2024

OS

Windows

Operating System version

Windows 11 24H2 26100.2161 running WSL2 Ubuntu 22

Visual Studio Code version

1.95.1

ESP-IDF version

5.3.1

Python version

3.10.12 (included with ESP-IDF)

Doctor command output

doctor.txt

Extension

No response

Description

During the build process any errors & warnings emitted by compiler are shown on the Problems tab in VSCode
Here you can see the the build task log while it is still in progress (compilation finished, but linker is still running)

image

Then the build is completed successfully and size task is run. After that it switches to the Output tab displaying the "Build complete" message. Somewhere here (rather when it switches to Output, but it's hard to catch) - the Problems tab gets cleared and all warnings / errors are lost:

image
image

Same happens for "Build, Flash & Monitor" flow.

It does not happen if the build fails, i.e. Problems tab contains the errors emitted by compiler here:
image
image

Debug Message

-

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@fronders fronders added the bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue) label Nov 8, 2024
@github-actions github-actions bot changed the title Problems tab gets cleared after build is finished Problems tab gets cleared after build is finished (VSC-1517) Nov 8, 2024
@brianignacio5
Copy link
Collaborator

This is a duplicate of #764

As described there, whenever you run multiple tasks, the last task clear the existing problems tasks. You can disable the IDF Size task from being executed after build task to maintain the errors from build.

@brianignacio5 brianignacio5 self-assigned this Nov 11, 2024
@brianignacio5 brianignacio5 added the duplicate This issue or pull request already exists label Nov 11, 2024
@fronders
Copy link
Author

fronders commented Nov 11, 2024

@brianignacio5 wouldn't it be better to make the size command part of the build task at the very end (if there are no errors)? This is what Eclipse CDT does for example. You don't even have the size task button on the toolbar, so I doubt it gets launched explicitly a lot. That way user would get both the size breakout output and keep the problems tab warnings

After disabling the size output, I also noticed that Monitor task does not erase problems, but the Flash does. Is it possible to modify Size / Flash tasks to behave in a similar way?

UPD: The Monitor task does not switch to Output tab, but Flash and Build tasks do, it's that moment when it switched to Output that the Problems gets wiped. During the actual flashing the Problems were still there. Maybe just don't print anything in the Output tab? It's kinda annoying to switch back and forth to build task output anyway

@brianignacio5
Copy link
Collaborator

brianignacio5 commented Nov 11, 2024

The issue is the way vscode handle task and task output to parse errors.

Each task executed is parsed to populate errors in the problems tabs. I have tested to reuse the same task terminal and have separated terminals without success. The vscode api just return an exit code to know if task fail (warnings for example return exit code 0 which is same as successful build) so concatenation of build task + size task will result in same behavior of cleared problems. After a new task is executed, problems always get cleared and I haven't found a way to persist errors in problems tabs (problems are generated by vscode and the extension code can't persist them among tasks execution).

The switch to output tab was fixed in current master vsix so next release shouldn't switch to output tab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Bug Report from users on Github (don't use this tag manually, its supposed to be used via the issue) duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants