@@ -16,7 +16,10 @@ import '../utils.dart';
16
16
///
17
17
/// By default, this command builds DevTools in release mode, but this can be
18
18
/// overridden by passing 'debug' or 'profile' as the
19
- /// [BuildCommandArgs.buildMode] argument.
19
+ /// [BuildCommandArgs.buildMode] argument. For testing embedded content in
20
+ /// VS Code, 'profile' or the default 'release' mode must be used because
21
+ /// the '--dart2js-optimization=O1' flag that is passed for 'debug' builds
22
+ /// will cause issues with the VS Code embedding.
20
23
///
21
24
/// If the [BuildCommandArgs.useFlutterFromPath] argument is present, the
22
25
/// Flutter SDK will not be updated to the latest Flutter candidate before
@@ -84,7 +87,7 @@ class BuildCommand extends Command {
84
87
workingDirectory: repo.devtoolsAppDirectoryPath,
85
88
);
86
89
87
- logStatus ('building DevTools in release mode' );
90
+ logStatus ('building DevTools in $ buildMode mode' );
88
91
await processManager.runAll (
89
92
commands: [
90
93
if (runPubGet) CliCommand .tool (['pub-get' , '--only-main' ]),
@@ -95,6 +98,8 @@ class BuildCommand extends Command {
95
98
'--web-renderer' ,
96
99
'canvaskit' ,
97
100
'--pwa-strategy=offline-first' ,
101
+ // Do not minify stack traces in debug mode.
102
+ if (buildMode == 'debug' ) '--dart2js-optimization=O1' ,
98
103
if (buildMode != 'debug' ) '--$buildMode ' ,
99
104
'--no-tree-shake-icons' ,
100
105
],
0 commit comments