| 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 import argparse | 6 import argparse |
| 7 import os | 7 import os |
| 8 import subprocess | 8 import subprocess |
| 9 import sys | 9 import sys |
| 10 import urlparse | 10 import urlparse |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 url = args.url | 52 url = args.url |
| 53 if not urlparse.urlparse(url).scheme: | 53 if not urlparse.urlparse(url).scheme: |
| 54 url = start_http_server_for_file(url) | 54 url = start_http_server_for_file(url) |
| 55 | 55 |
| 56 prompt_args = '--args-for=mojo://sky_debugger_prompt/ %s' % url | 56 prompt_args = '--args-for=mojo://sky_debugger_prompt/ %s' % url |
| 57 shell_command.append(prompt_args) | 57 shell_command.append(prompt_args) |
| 58 if args.gdb: | 58 if args.gdb: |
| 59 shell_command = ['gdb', '--args'] + shell_command | 59 shell_command = ['gdb', '--args'] + shell_command |
| 60 | 60 |
| 61 print ' '.join(shell_command) | 61 print ' '.join(shell_command) |
| 62 print "To inspect, include:" |
| 63 print '<link rel="import" href="/sky/framework/inspector/inspector.sky" />' |
| 64 print "And open:" |
| 65 print "chrome-devtools://devtools/bundled/devtools.html?ws=localhost:9898" |
| 62 subprocess.check_call(shell_command) | 66 subprocess.check_call(shell_command) |
| 63 | 67 |
| 64 | 68 |
| 65 if __name__ == '__main__': | 69 if __name__ == '__main__': |
| 66 try: | 70 try: |
| 67 main() | 71 main() |
| 68 except (KeyboardInterrupt, SystemExit): | 72 except (KeyboardInterrupt, SystemExit): |
| 69 print "Quitting" | 73 print "Quitting" |
| OLD | NEW |