From 28626cf782e8b80f958a73f683ff0e306266673b Mon Sep 17 00:00:00 2001 From: Eric Seidel Date: Tue, 28 Oct 2014 13:18:17 -0700 Subject: [PATCH] Fix the inspector and integrate it with skydb R=abarth@chromium.org Review URL: https://codereview.chromium.org/690433002 --- engine/src/flutter/tools/sky_server | 31 +++++++++++++++++++++-------- engine/src/flutter/tools/skydb | 5 ++++- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/engine/src/flutter/tools/sky_server b/engine/src/flutter/tools/sky_server index c826d56736f..ae38fccc57c 100755 --- a/engine/src/flutter/tools/sky_server +++ b/engine/src/flutter/tools/sky_server @@ -7,10 +7,14 @@ import argparse import os import cherrypy + BUILD_DIRECTORY = 'out' CONFIG_DIRECTORY = 'Debug' -GEN_DIRECTORY = os.path.abspath(os.path.join(__file__, os.pardir, os.pardir, - os.pardir, BUILD_DIRECTORY, CONFIG_DIRECTORY, 'gen')) +SRC_ROOT = os.path.abspath(os.path.join(__file__, os.pardir, os.pardir, + os.pardir)) +SKY_ROOT = os.path.join(SRC_ROOT, 'sky') +GEN_ROOT = os.path.join(SRC_ROOT, BUILD_DIRECTORY, CONFIG_DIRECTORY, 'gen') + # FIXME: This doesn't yet support directory listings. We'll do something like: # http://tools.cherrypy.org/wiki/staticdirindex @@ -30,14 +34,25 @@ def main(): 'tools.staticdir.on': True, 'tools.staticdir.dir': os.path.abspath(args.app_path), }, - '/sky': { - 'tools.staticdir.on': True, - 'tools.staticdir.dir': os.path.join(GEN_DIRECTORY, 'sky'), - }, '/mojo': { 'tools.staticdir.on': True, - 'tools.staticdir.dir': os.path.join(GEN_DIRECTORY, 'mojo'), - } + 'tools.staticdir.dir': os.path.join(GEN_ROOT, 'mojo'), + }, + '/sky': { + 'tools.staticdir.on': True, + 'tools.staticdir.dir': os.path.join(GEN_ROOT, 'sky'), + }, + # src-relative to avoid needing to rebuild when changing inspector: + '/sky/framework': { + 'tools.staticdir.on': True, + 'tools.staticdir.dir': + os.path.join(SKY_ROOT, 'framework'), + }, + '/sky/framework/inspector/server': { + 'tools.staticdir.on': True, + 'tools.staticdir.dir': os.path.join(GEN_ROOT, 'sky', 'framework', + 'inspector', 'server'), + }, } cherrypy.quickstart(config=config) diff --git a/engine/src/flutter/tools/skydb b/engine/src/flutter/tools/skydb index cfe1996ce64..de74aadbb0e 100755 --- a/engine/src/flutter/tools/skydb +++ b/engine/src/flutter/tools/skydb @@ -58,7 +58,10 @@ def main(): if args.gdb: shell_command = ['gdb', '--args'] + shell_command - print ' '.join(shell_command) + print "To inspect, include:" + print '' + print "And open:" + print "chrome-devtools://devtools/bundled/devtools.html?ws=localhost:9898" subprocess.check_call(shell_command)