Fix the inspector and integrate it with skydb

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/690433002
This commit is contained in:
Eric Seidel 2014-10-28 13:18:17 -07:00
parent 561c220b27
commit 28626cf782
2 changed files with 27 additions and 9 deletions

View File

@ -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)

View File

@ -58,7 +58,10 @@ def main():
if args.gdb:
shell_command = ['gdb', '--args'] + shell_command
print ' '.join(shell_command)
print "To inspect, include:"
print '<link rel="import" href="/sky/framework/inspector/inspector.sky" />'
print "And open:"
print "chrome-devtools://devtools/bundled/devtools.html?ws=localhost:9898"
subprocess.check_call(shell_command)