File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 187187 "default" : " ../bin/Microsoft.PowerShell.EditorServices.Host.exe" ,
188188 "description" : " Specifies the path to the PowerShell Editor Services host executable."
189189 },
190+ "powershell.developer.editorServicesLogLevel" : {
191+ "type" : " string" ,
192+ "default" : " Normal" ,
193+ "description" : " Sets the logging verbosity level for the PowerShell Editor Services host executable."
194+ },
190195 "powershell.developer.editorServicesWaitForDebugger" : {
191196 "type" : " boolean" ,
192197 "default" : false ,
Original file line number Diff line number Diff line change @@ -68,6 +68,9 @@ export function activate(context: vscode.ExtensionContext): void {
6868 if ( settings . developer . editorServicesWaitForDebugger ) {
6969 args . push ( '/waitForDebugger' ) ;
7070 }
71+ if ( settings . developer . editorServicesLogLevel ) {
72+ args . push ( '/logLevel:' + settings . developer . editorServicesLogLevel )
73+ }
7174
7275 let serverPath = resolveLanguageServerPath ( settings ) ;
7376 let serverOptions = {
@@ -95,8 +98,14 @@ export function activate(context: vscode.ExtensionContext): void {
9598 serverOptions ,
9699 clientOptions ) ;
97100
101+ languageServerClient . onReady ( ) . then (
102+ ( ) => registerFeatures ( ) ,
103+ ( reason ) => vscode . window . showErrorMessage ( "Could not start language service: " + reason ) ) ;
104+
98105 languageServerClient . start ( ) ;
106+ }
99107
108+ function registerFeatures ( ) {
100109 // Register other features
101110 registerExpandAliasCommand ( languageServerClient ) ;
102111 registerShowHelpCommand ( languageServerClient ) ;
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ export interface IScriptAnalysisSettings {
1212
1313export interface IDeveloperSettings {
1414 editorServicesHostPath ?: string ;
15+ editorServicesLogLevel ?: string ;
1516 editorServicesWaitForDebugger ?: boolean ;
1617}
1718
@@ -29,6 +30,7 @@ export function load(myPluginId: string): ISettings {
2930
3031 let defaultDeveloperSettings = {
3132 editorServicesHostPath : "../bin/Microsoft.PowerShell.EditorServices.Host.exe" ,
33+ editorServicesLogLevel : "Normal" ,
3234 editorServicesWaitForDebugger : false
3335 }
3436
You can’t perform that action at this time.
0 commit comments