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 {
48
48
var settings = Settings . load ( ) ;
49
49
let createNewIntegratedConsole = settings . debugging . createTemporaryIntegratedConsole ;
50
50
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
+
51
59
if ( generateLaunchConfig ) {
52
60
// No launch.json, create the default configuration for both unsaved (Untitled) and saved documents.
53
61
config . type = 'PowerShell' ;
Original file line number Diff line number Diff line change @@ -217,6 +217,10 @@ export class SessionManager implements Middleware {
217
217
return this . sessionDetails ;
218
218
}
219
219
220
+ public getPowerShellVersionDetais ( ) : PowerShellVersionDetails {
221
+ return this . versionDetails ;
222
+ }
223
+
220
224
public dispose ( ) : void {
221
225
// Stop the current session
222
226
this . stop ( ) ;
You can’t perform that action at this time.
0 commit comments