| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2014 The Chromium Authors. All rights reserved. | 2 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 from skypy.skyserver import SkyServer | 6 from skypy.skyserver import SkyServer |
| 7 import argparse | 7 import argparse |
| 8 import json | 8 import json |
| 9 import logging | 9 import logging |
| 10 import os | 10 import os |
| (...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 | 565 |
| 566 gdb_attach_parser = subparsers.add_parser('gdb_attach', | 566 gdb_attach_parser = subparsers.add_parser('gdb_attach', |
| 567 help='launch gdb and attach to gdbserver launched from start --gdb') | 567 help='launch gdb and attach to gdbserver launched from start --gdb') |
| 568 gdb_attach_parser.set_defaults(func=self.gdb_attach_command) | 568 gdb_attach_parser.set_defaults(func=self.gdb_attach_command) |
| 569 | 569 |
| 570 self._add_basic_command(subparsers, 'trace', '/trace', | 570 self._add_basic_command(subparsers, 'trace', '/trace', |
| 571 'toggle tracing') | 571 'toggle tracing') |
| 572 self._add_basic_command(subparsers, 'reload', '/reload', | 572 self._add_basic_command(subparsers, 'reload', '/reload', |
| 573 'reload the current page') | 573 'reload the current page') |
| 574 self._add_basic_command(subparsers, 'inspect', '/inspect', | 574 self._add_basic_command(subparsers, 'inspect', '/inspect', |
| 575 'stop the running sky instance') | 575 'start the inspector on the current page (Linux only)') |
| 576 self._add_basic_command(subparsers, 'start_profiling', '/start_profiling
', | 576 self._add_basic_command(subparsers, 'start_profiling', '/start_profiling
', |
| 577 'starts profiling the running sky instance (Linux only)') | 577 'starts profiling the running sky instance (Linux only)') |
| 578 | 578 |
| 579 stop_profiling_parser = subparsers.add_parser('stop_profiling', | 579 stop_profiling_parser = subparsers.add_parser('stop_profiling', |
| 580 help='stops profiling the running sky instance (Linux only)') | 580 help='stops profiling the running sky instance (Linux only)') |
| 581 stop_profiling_parser.set_defaults(func=self.stop_profiling_command) | 581 stop_profiling_parser.set_defaults(func=self.stop_profiling_command) |
| 582 | 582 |
| 583 load_parser = subparsers.add_parser('load', | 583 load_parser = subparsers.add_parser('load', |
| 584 help='load a new page in the currently running sky') | 584 help='load a new page in the currently running sky') |
| 585 load_parser.add_argument('url_or_path', type=str) | 585 load_parser.add_argument('url_or_path', type=str) |
| 586 load_parser.set_defaults(func=self.load_command) | 586 load_parser.set_defaults(func=self.load_command) |
| 587 | 587 |
| 588 args = parser.parse_args() | 588 args = parser.parse_args() |
| 589 args.func(args) | 589 args.func(args) |
| 590 | 590 |
| 591 self._write_pid_file(PID_FILE_PATH, self.pids) | 591 self._write_pid_file(PID_FILE_PATH, self.pids) |
| 592 | 592 |
| 593 | 593 |
| 594 if __name__ == '__main__': | 594 if __name__ == '__main__': |
| 595 SkyDebugger().main() | 595 SkyDebugger().main() |
| OLD | NEW |