So while I love the Live Preview feature from Brackets, it always annoys me when I’m developing along, go to test, and Brackets tells me I need to restart my browser so it can enable the feature (Edit: As Randy notes, the restart is only required on Mac). Luckily there’s a way to enable Chrome to always start with the remote debugging feature Brackets needs. And using Automator I was able to add a shell script as something that could live in my Dock so that I’m able to use that as my launcher for Chrome.
The shell script just uses the
open /Applications/Google\ Chrome.app/ --args --remote-debugging-port=9222
There are a couple of drawbacks. One, I have no idea what this has in terms of security implications (leaving the remote deubgging on all the time). That’s something I need to look into. The other downside is that this doesn’t open up within the same process, so you end up with the Chrome icon in the dock in addition to your shortcut. But that seems minor. Edit: Also, what would be ideal is if this was a flag exposed in Chrome so that you can make it persistent through opening/closing Chrome. Luckily Adam filed this as a request.
If you want to just grab the Automator file, I’ve got it on Dropbox.Tweet