$ git clone git@github.com:ChromeDevTools/devtools-frontend.git
或者 npm chrome-devtools-frontend
npm start(npm run chrome + npm run server)
在执行启动前先去下载google chrome canary 版本,然后执行npm start,会发现浏览器调用起来了,并且默认打了两个tab(inspectable pages 和 )
// scripts/hosted_mode/server.js
var proxyFilePathToURL = {
'/front_end/SupportedCSSProperties.js': cloudURL.bind(null, 'SupportedCSSProperties.js'),
'/front_end/InspectorBackendCommands.js': cloudURL.bind(null, 'InspectorBackendCommands.js'),
'/favicon.ico': () => 'https://chrome-devtools-frontend.appspot.com/favicon.ico',
'/front_end/accessibility/ARIAProperties.js': cloudURL.bind(null, 'accessibility/ARIAProperties.js'),
};
function cloudURL(path, commitHash) {
console.log(111,`https://chrome-devtools-frontend.appspot.com/serve_file/@${commitHash}/${path}`)
return `https://chrome-devtools-frontend.appspot.com/serve_file/@${commitHash}/${path}`;
}
1、可以本地启动webserver然后将跟指定到dev-tools根目录,然后直接访问本地端口+路径,
然后单独运行npm run chrome
2、本地run server 去掉中转本地资源,然后 本地运行即可