Adobe Brackets实时预览Live Preview原理:Brackets-node <=> Chrome(--remote-debugging-port)Chrome通过参数--remote-debugging-port建立远程调试端口.Brackets内部通过Node.JS跟Chrome建立长连接,从而实现实时预览. Brackets Live Preview 传给 Chrome 的命令行参数: Linux:/usr/bin/google-chrome \--no-first-run \--no-default-browser-check \--allow-file-access-from-files \--temp-profile \--user-data-dir=/home/eechen/.config/Brackets/live-dev-profile \--remote-debugging-port=9222 \--flag-switches-begin \--flag-switches-end \file:///opt/brackets/www/LiveDevelopment/launch.html Windows:"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --user-data-dir="C:/Users/eechen/AppData/Roaming/Brackets/live-dev-profile" --no-first-run --no-default-browser-check --allow-file-access-from-files --remote-debugging-port=9222 --flag-switches-begin --flag-switches-endfile:///C:/Program%20Files%20(x86)/Brackets/www/LiveDevelopment/launch 确定你的系统指定路径中是否存在可供Brackets调用的Chrome.
Adobe Brackets实时预览Live Preview原理:
Brackets-node <=> Chrome(--remote-debugging-port)
Chrome通过参数--remote-debugging-port建立远程调试端口.
Brackets内部通过Node.JS跟Chrome建立长连接,从而实现实时预览.
Brackets Live Preview 传给 Chrome 的命令行参数:
Linux:
/usr/bin/google-chrome \
--no-first-run \
--no-default-browser-check \
--allow-file-access-from-files \
--temp-profile \
--user-data-dir=/home/eechen/.config/Brackets/live-dev-profile \
--remote-debugging-port=9222 \
--flag-switches-begin \
--flag-switches-end \
file:///opt/brackets/www/LiveDevelopment/launch.html
Windows:
"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
--user-data-dir="C:/Users/eechen/AppData/Roaming/Brackets/live-dev-profile"
--no-first-run
--no-default-browser-check
--allow-file-access-from-files
--remote-debugging-port=9222
--flag-switches-begin
--flag-switches-end
file:///C:/Program%20Files%20(x86)/Brackets/www/LiveDevelopment/launch
确定你的系统指定路径中是否存在可供Brackets调用的Chrome.