Skip to content

Commit 2bba53c

Browse files
committed
Merge branch 'master' into rkeithhill/is122-scriptAnalysisProfilePath
2 parents 3663252 + e4f3dcc commit 2bba53c

File tree

3 files changed

+30
-3
lines changed

3 files changed

+30
-3
lines changed

package.json

+14-2
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,10 @@
121121
},
122122
"args": [
123123
"/debugAdapter",
124-
"/logLevel:Verbose"
124+
"/logLevel:Verbose",
125+
"/hostName:\"Visual Studio Code Host\"",
126+
"/hostProfileId:Microsoft.VSCode",
127+
"/hostVersion:0.5.0"
125128
],
126129
"configurationAttributes": {
127130
"launch": {
@@ -179,7 +182,11 @@
179182
"program": "bin/Microsoft.PowerShell.EditorServices.Host.x86.exe"
180183
},
181184
"args": [
182-
"/debugAdapter"
185+
"/debugAdapter",
186+
"/logLevel:Verbose",
187+
"/hostName:\"Visual Studio Code Host\"",
188+
"/hostProfileId:Microsoft.VSCode",
189+
"/hostVersion:0.5.0"
183190
],
184191
"configurationAttributes": {
185192
"launch": {
@@ -228,6 +235,11 @@
228235
"default": false,
229236
"description": "If true, causes the 32-bit language service to be used on 64-bit Windows. On 32-bit Windows this setting has no effect. This setting does not affect the debugger which has its own architecture configuration."
230237
},
238+
"powershell.enableProfileLoading": {
239+
"type": "boolean",
240+
"default": false,
241+
"description": "If true, causes user and system wide profiles (profile.ps1 and Microsoft.VSCode_profile.ps1) to be loaded into the PowerShell session. This affects IntelliSense and interactive script execution. The debugger is not affected by this setting."
242+
},
231243
"powershell.scriptAnalysis.enable": {
232244
"type": "boolean",
233245
"default": true,

src/main.ts

+14-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,20 @@ export function activate(context: vscode.ExtensionContext): void {
6363
// The language server is only available on Windows
6464
if (os.platform() == "win32")
6565
{
66-
let args = [];
66+
// Get the current version of this extension
67+
var hostVersion =
68+
vscode
69+
.extensions
70+
.getExtension("ms-vscode.PowerShell")
71+
.packageJSON
72+
.version;
73+
74+
let args = [
75+
"/hostName:\"Visual Studio Code Host\"",
76+
"/hostProfileId:\"Microsoft.VSCode\"",
77+
"/hostVersion:" + hostVersion
78+
];
79+
6780
if (settings.developer.editorServicesWaitForDebugger) {
6881
args.push('/waitForDebugger');
6982
}

src/settings.ts

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export interface IDeveloperSettings {
1919

2020
export interface ISettings {
2121
useX86Host?: boolean,
22+
enableProfileLoading?: boolean,
2223
scriptAnalysis?: IScriptAnalysisSettings,
2324
developer?: IDeveloperSettings,
2425
}
@@ -39,6 +40,7 @@ export function load(myPluginId: string): ISettings {
3940

4041
return {
4142
useX86Host: configuration.get<boolean>("useX86Host", false),
43+
enableProfileLoading: configuration.get<boolean>("enableProfileLoading", false),
4244
scriptAnalysis: configuration.get<IScriptAnalysisSettings>("scriptAnalysis", defaultScriptAnalysisSettings),
4345
developer: configuration.get<IDeveloperSettings>("developer", defaultDeveloperSettings)
4446
}

0 commit comments

Comments
 (0)