| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 if args.url: | 51 if args.url: |
| 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 "To inspect, include:" | |
| 62 print '<link rel="import" href="/sky/framework/inspector/inspector.sky" />' | |
| 63 print "And open:" | |
| 64 print "chrome-devtools://devtools/bundled/devtools.html?ws=localhost:9898" | |
| 65 subprocess.check_call(shell_command) | 61 subprocess.check_call(shell_command) |
| 66 | 62 |
| 67 | 63 |
| 68 if __name__ == '__main__': | 64 if __name__ == '__main__': |
| 69 try: | 65 try: |
| 70 main() | 66 main() |
| 71 except (KeyboardInterrupt, SystemExit): | 67 except (KeyboardInterrupt, SystemExit): |
| 72 print "Quitting" | 68 print "Quitting" |
| OLD | NEW |