File tree 3 files changed +16
-0
lines changed
3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 187
187
"default" : " ../bin/Microsoft.PowerShell.EditorServices.Host.exe" ,
188
188
"description" : " Specifies the path to the PowerShell Editor Services host executable."
189
189
},
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
+ },
190
195
"powershell.developer.editorServicesWaitForDebugger" : {
191
196
"type" : " boolean" ,
192
197
"default" : false ,
Original file line number Diff line number Diff line change @@ -68,6 +68,9 @@ export function activate(context: vscode.ExtensionContext): void {
68
68
if ( settings . developer . editorServicesWaitForDebugger ) {
69
69
args . push ( '/waitForDebugger' ) ;
70
70
}
71
+ if ( settings . developer . editorServicesLogLevel ) {
72
+ args . push ( '/logLevel:' + settings . developer . editorServicesLogLevel )
73
+ }
71
74
72
75
let serverPath = resolveLanguageServerPath ( settings ) ;
73
76
let serverOptions = {
@@ -95,8 +98,14 @@ export function activate(context: vscode.ExtensionContext): void {
95
98
serverOptions ,
96
99
clientOptions ) ;
97
100
101
+ languageServerClient . onReady ( ) . then (
102
+ ( ) => registerFeatures ( ) ,
103
+ ( reason ) => vscode . window . showErrorMessage ( "Could not start language service: " + reason ) ) ;
104
+
98
105
languageServerClient . start ( ) ;
106
+ }
99
107
108
+ function registerFeatures ( ) {
100
109
// Register other features
101
110
registerExpandAliasCommand ( languageServerClient ) ;
102
111
registerShowHelpCommand ( languageServerClient ) ;
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ export interface IScriptAnalysisSettings {
12
12
13
13
export interface IDeveloperSettings {
14
14
editorServicesHostPath ?: string ;
15
+ editorServicesLogLevel ?: string ;
15
16
editorServicesWaitForDebugger ?: boolean ;
16
17
}
17
18
@@ -29,6 +30,7 @@ export function load(myPluginId: string): ISettings {
29
30
30
31
let defaultDeveloperSettings = {
31
32
editorServicesHostPath : "../bin/Microsoft.PowerShell.EditorServices.Host.exe" ,
33
+ editorServicesLogLevel : "Normal" ,
32
34
editorServicesWaitForDebugger : false
33
35
}
34
36
You can’t perform that action at this time.
0 commit comments