Skip to content

Commit eeafc03

Browse files
committed
Fix launching DevTools externally for non-Flutter apps when dart.openDevTools is set to "always"
Fixes #5025
1 parent 59c2b85 commit eeafc03

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎src/extension/commands/debug.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,8 @@ export class DebugCommands implements IAmDisposable {
753753
// If embedded DevTools is enabled and it's a Flutter app, assume the user wants the Widget inspector.
754754
// Otherwise, DevTools will be launched externally (since it's not clear which page they may want).
755755
const page = debuggerType === DebuggerType.Flutter ? widgetInspectorPage : null;
756-
void vs.commands.executeCommand("dart.openDevTools", { debugSessionId: session.session.id, triggeredAutomatically: true, pageId: page?.id, commandSource: CommandSource.onDebugAutomatic });
756+
const location = page ? undefined : "external";
757+
void vs.commands.executeCommand("dart.openDevTools", { debugSessionId: session.session.id, triggeredAutomatically: true, pageId: page?.id, location, commandSource: CommandSource.onDebugAutomatic });
757758
}
758759
} else if (debuggerType === DebuggerType.Flutter) {
759760
void showDevToolsNotificationIfAppropriate(this.context).then((res) => {

0 commit comments

Comments
 (0)