You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a simple extension that generates multi-line diagnostics and verify that the Problems view show the diagnostic message in multiple lines. You can also toggle to show the message in multiple lines or single line in the view.
Play around with problems view by generating different types of diagnostics
Sample extension code:
'use strict';import*asvscodefrom'vscode';exportfunctionactivate(context: vscode.ExtensionContext){constdiagnosticsCollection=vscode.languages.createDiagnosticCollection('test');vscode.window.onDidChangeActiveTextEditor(e=>{if(e&&e.document){constdiagnostics: vscode.Diagnostic[]=[];letmessage="this is a message with multiple lines. \nLine 1\nLine2\nLine3";constdiagnostic=newvscode.Diagnostic(newvscode.Range(newvscode.Position(10,1),newvscode.Position(10,10)),message,vscode.DiagnosticSeverity.Error);diagnostic.source='test';diagnostic.code='1234';diagnostic.relatedInformation=[];diagnostics.push(diagnostic);diagnosticsCollection.set(e.document.uri,diagnostics);}});}
Or use the following typescript code that has a multiple line diagnostic
Testing: #1927
Complexity: 3
Create a simple extension that generates multi-line diagnostics and verify that the Problems view show the diagnostic message in multiple lines. You can also toggle to show the message in multiple lines or single line in the view.
Play around with problems view by generating different types of diagnostics
Sample extension code:
Or use the following typescript code that has a multiple line diagnostic
The text was updated successfully, but these errors were encountered: