Question

Since Brackets seems to start a new instance of Chrome, (how) can I make it start Chrome with the --disable-web-security option, in order to get around CORS problems when developing both the client & server on my local machine?

Was it helpful?

Solution

From How to Use Brackets - Live Preview:

Live Preview currently has a few other important limitations:

  • It only works with desktop Chrome as the target browser.
  • Opening the Developer Tools in Chrome will close the live development connection.
  • Files must be inside your "project" (the root folder you currently have open in Brackets).
  • Only one HTML file can be previewed at a time. If you switch to a different HTML file in Brackets, the browser preview will switch to that new page as well.
  • Updating pauses when the HTML is syntactically invalid (e.g. after you type '<' for a new tag but before you type the closing '>'). The line number and Live Preview icon turn red in this case. Brackets will resume pushing changes to the browser when syntax becomes valid again.

If you want to achieve what you want, edit the source code of Brackets IDE.

OTHER TIPS

This isn't configurable yet in Brackets. We plan to make launching Live Preview more flexible in the future, which would probably make it easy to configure the args Chrome is launched with - but that probably won't happen for a while.

If you wanted to custom-patch Brackets, as the other answer suggests, you'd need to modify the native code that launches Chrome and make a custom build of brackets-shell. If you're pulling the source from Git, keeping up with Brackets updates isn't all that bad because you'll just be doing a git merge from upstream, which should preserve all your diffs.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top