Skip to content

Don't minify stack traces when building in debug mode #7587

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions tool/lib/commands/build.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ import '../utils.dart';
///
/// By default, this command builds DevTools in release mode, but this can be
/// overridden by passing 'debug' or 'profile' as the
/// [BuildCommandArgs.buildMode] argument.
/// [BuildCommandArgs.buildMode] argument. For testing embedded content in
/// VS Code, 'profile' or the default 'release' mode must be used because
/// the '--dart2js-optimization=O1' flag that is passed for 'debug' builds
/// will cause issues with the VS Code embedding.
///
/// If the [BuildCommandArgs.useFlutterFromPath] argument is present, the
/// Flutter SDK will not be updated to the latest Flutter candidate before
Expand Down Expand Up @@ -84,7 +87,7 @@ class BuildCommand extends Command {
workingDirectory: repo.devtoolsAppDirectoryPath,
);

logStatus('building DevTools in release mode');
logStatus('building DevTools in $buildMode mode');
await processManager.runAll(
commands: [
if (runPubGet) CliCommand.tool(['pub-get', '--only-main']),
Expand All @@ -95,6 +98,8 @@ class BuildCommand extends Command {
'--web-renderer',
'canvaskit',
'--pwa-strategy=offline-first',
// Do not minify stack traces in debug mode.
if (buildMode == 'debug') '--dart2js-optimization=O1',
if (buildMode != 'debug') '--$buildMode',
'--no-tree-shake-icons',
],
Expand Down
Loading