Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I use Problems panel in my vscode extension?

I want to use Problems panel in my vscode extension,but I can not find the api.How can I use it or where can I find the api about Problems panel?

like image 297
Marx Jiao Avatar asked Jul 10 '16 04:07

Marx Jiao


People also ask

How do you see problems in VS Code?

For a cleaner view of the issues, navigate to the bottom of the build Output window, and click the Error List tab. This takes you to a more organized view of the errors and warnings for your project, and gives you some extra options as well.

How do I use an extension in VS Code?

You can browse and install extensions from within VS Code. Bring up the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of VS Code or the View: Extensions command (Ctrl+Shift+X). This will show you a list of the most popular VS Code extensions on the VS Code Marketplace.

How do I display the VS Code extension bar?

Go to VSCode settings ( CTRL+, or CMD+, ) and search for shortcut menu bar . Toggle buttons from there.


1 Answers

This is achieved through the use of Diagnostic objects. Each object will be a separate entry in the Problems panel.

Take a look at https://code.visualstudio.com/docs/extensions/example-language-server#_adding-a-simple-validation for an example of how it's done.

If you are not writing a language server, then you need to look into the DiagnosticsCollection class.

like image 103
seairth Avatar answered Dec 28 '22 09:12

seairth