@@ -139,6 +139,10 @@ def to_gn_args(args):
139
139
if args .dart_debug :
140
140
gn_args ['dart_debug' ] = True
141
141
142
+ if args .full_dart_debug :
143
+ gn_args ['dart_debug' ] = True
144
+ gn_args ['dart_debug_optimization_level' ] = '0'
145
+
142
146
if args .target_os == 'android' :
143
147
gn_args ['target_cpu' ] = args .android_cpu
144
148
elif args .target_os == 'ios' :
@@ -247,7 +251,10 @@ def parse_args(args):
247
251
parser .add_argument ('--runtime-mode' , type = str , choices = ['debug' , 'profile' , 'release' ], default = 'debug' )
248
252
parser .add_argument ('--dynamic' , default = False , action = 'store_true' )
249
253
parser .add_argument ('--interpreter' , default = False , action = 'store_true' )
250
- parser .add_argument ('--dart-debug' , default = False , action = 'store_true' )
254
+ parser .add_argument ('--dart-debug' , default = False , action = 'store_true' , help = 'Enables assertsion in the Dart VM. ' +
255
+ 'Does not affect affect optimization levels. If you need to disable optimizations in Dart, use --full-dart-debug' )
256
+ parser .add_argument ('--full-dart-debug' , default = False , action = 'store_true' , help = 'Implies --dart-debug ' +
257
+ 'and also disables optimizations in the Dart VM making it easier to step through VM code in the debugger.' )
251
258
252
259
parser .add_argument ('--target-os' , type = str , choices = ['android' , 'ios' , 'linux' ])
253
260
parser .add_argument ('--android' , dest = 'target_os' , action = 'store_const' , const = 'android' )
0 commit comments