@@ -139,6 +139,10 @@ def to_gn_args(args):
139139 if args .dart_debug :
140140 gn_args ['dart_debug' ] = True
141141
142+ if args .full_dart_debug :
143+ gn_args ['dart_debug' ] = True
144+ gn_args ['dart_debug_optimization_level' ] = '0'
145+
142146 if args .target_os == 'android' :
143147 gn_args ['target_cpu' ] = args .android_cpu
144148 elif args .target_os == 'ios' :
@@ -247,7 +251,10 @@ def parse_args(args):
247251 parser .add_argument ('--runtime-mode' , type = str , choices = ['debug' , 'profile' , 'release' ], default = 'debug' )
248252 parser .add_argument ('--dynamic' , default = False , action = 'store_true' )
249253 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.' )
251258
252259 parser .add_argument ('--target-os' , type = str , choices = ['android' , 'ios' , 'linux' ])
253260 parser .add_argument ('--android' , dest = 'target_os' , action = 'store_const' , const = 'android' )
0 commit comments