File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -125,7 +125,11 @@ export class DebugCommands implements IAmDisposable {
125125 return this . devTools . spawnForSession ( session as DartDebugSessionInformation & { vmServiceUri : string } , { notify, page } ) ;
126126 } else if ( session . session . configuration . noDebug ) {
127127 vs . window . showInformationMessage ( "You must start your app with debugging in order to use DevTools." ) ;
128+ } else if ( session . hasStarted ) {
129+ vs . window . showInformationMessage ( "DevTools is not available for an app running in this mode." ) ;
128130 } else {
131+ // TODO: Remove the last part of this after the next Flutter release (after 3.0) when the appStarted event
132+ // is passed.
129133 vs . window . showInformationMessage ( "This debug session is not ready yet or does not support DevTools." ) ;
130134 }
131135 } ) ) ;
@@ -668,6 +672,8 @@ export class DebugCommands implements IAmDisposable {
668672 }
669673 clearTimeout ( timer ) ;
670674 this . suppressFlutterWidgetErrors = false ;
675+ } else if ( e . event === "flutter.appStarted" ) {
676+ session . hasStarted = true ;
671677 }
672678 }
673679
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ export class DartDebugSessionInformation {
66 public observatoryUri ?: string ;
77 public vmServiceUri ?: string ;
88 public readonly sessionStart : Date = new Date ( ) ;
9+ public hasStarted = false ;
910 public hasEnded = false ;
1011 public progress : { [ key : string ] : ProgressMessage } = { } ;
1112 public readonly loadedServiceExtensions : VmServiceExtension [ ] = [ ] ;
You can’t perform that action at this time.
0 commit comments