File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,14 @@ export class DebugSessionFeature implements IFeature {
4848 var settings = Settings . load ( ) ;
4949 let createNewIntegratedConsole = settings . debugging . createTemporaryIntegratedConsole ;
5050
51+ if ( config . request === "attach" ) {
52+ let versionDetails = this . sessionManager . getPowerShellVersionDetais ( ) ;
53+ if ( versionDetails . edition . toLowerCase ( ) === "core" ) {
54+ vscode . window . showErrorMessage ( "PowerShell Core does not support attaching to a PowerShell host process." ) ;
55+ return ;
56+ }
57+ }
58+
5159 if ( generateLaunchConfig ) {
5260 // No launch.json, create the default configuration for both unsaved (Untitled) and saved documents.
5361 config . type = 'PowerShell' ;
Original file line number Diff line number Diff line change @@ -217,6 +217,10 @@ export class SessionManager implements Middleware {
217217 return this . sessionDetails ;
218218 }
219219
220+ public getPowerShellVersionDetais ( ) : PowerShellVersionDetails {
221+ return this . versionDetails ;
222+ }
223+
220224 public dispose ( ) : void {
221225 // Stop the current session
222226 this . stop ( ) ;
You can’t perform that action at this time.
0 commit comments