@@ -46,7 +46,7 @@ def fix_for_printing(arg):
4646 print " " .join (map (fix_for_printing , cmd_args ))
4747
4848
49- def start_replay_server (args , sites ):
49+ def start_replay_server (args , sites , discard_output = True ):
5050 with tempfile .NamedTemporaryFile (prefix = 'callstats-inject-' , suffix = '.js' ,
5151 mode = 'wt' , delete = False ) as f :
5252 injection = f .name
@@ -65,8 +65,11 @@ def start_replay_server(args, sites):
6565 ]
6666 print "=" * 80
6767 print_command (cmd_args )
68- with open (os .devnull , 'w' ) as null :
69- server = subprocess .Popen (cmd_args , stdout = null , stderr = null )
68+ if discard_output :
69+ with open (os .devnull , 'w' ) as null :
70+ server = subprocess .Popen (cmd_args , stdout = null , stderr = null )
71+ else :
72+ server = subprocess .Popen (cmd_args )
7073 print "RUNNING REPLAY SERVER: %s with PID=%s" % (args .replay_bin , server .pid )
7174 print "=" * 80
7275 return {'process' : server , 'injection' : injection }
@@ -292,12 +295,12 @@ def do_run_replay_server(args):
292295 print (" " + site ['url' ])
293296 print ("- " * 40 )
294297 print ("Launch chromium with the following commands for debugging:" )
295- flags = get_chrome_flags ("'--runtime-calls -stats --allow-natives-syntax'" ,
298+ flags = get_chrome_flags ("'--runtime-call -stats --allow-natives-syntax'" ,
296299 "/var/tmp/`date +%s`" )
297300 flags += get_chrome_replay_flags (args )
298301 print (" $CHROMIUM_DIR/out/Release/chomium " + (" " .join (flags )) + " <URL>" )
299302 print ("- " * 40 )
300- replay_server = start_replay_server (args , sites )
303+ replay_server = start_replay_server (args , sites , discard_output = False )
301304 try :
302305 replay_server ['process' ].wait ()
303306 finally :
0 commit comments