Always Starting Chrome with Brackets Live Preview Support

My good friends Chrome and Brackets all blended together.

I believe there is a special place in application hell for applications that make me restart my browser. Allow some hyperbole here, but I always felt like that was on par with someone coming into my house while I’m working and punching me in the face. Making me restart my browser makes me lose my music, sometimes lose my place in a video, and since I have a ton of tabs open, makes me sit there and wait while every one of them reloads.

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 command:

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.

  • Randy Edmunds

    Hey Ryan,

    Great article! There’s a typo in the first sentence where it says “applications that make me start my browser”, *start* should be *restart*. Also, this only applies to Mac, a restart is not required on Windows.

    Thanks,
    Randy

  • http://blog.digitalbackcountry.com Ryan Stewart

    Thanks for the catch Randy. And I updated the page to reflect that it’s only Mac.

  • http://top-medical-schools.net/ Top Medical Schools

    Thanks, great and very useful article

  • http://www.extremeictworld.blogspot.com/ Cc

    Good Post than you…