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?

- 38,334
- 103
- 306
- 551
2 Answers
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.

- 4,667
- 2
- 27
- 40

- 443
- 1
- 6
- 14
-
Some very good pints, thanks. But, rather than edit the Brackets source - every time they release a new version, it it would be better to request a change from the developers. – Mawg says reinstate Monica Apr 26 '14 at 04:11
-
1I agree with you. However I am not sure if you can achieve one browser for both normal browsing and live preview. Live Preview enabled remote debug of Chrome, which behave different from default chrome. – ZhijieWang Apr 26 '14 at 11:51
-
+1 Yes, but I can live without Chrome for day to day browsing. Right not, on Windows, I am using XAMPP for Apache and invoking Chrome with `--disable-web-security --allow-file-access-from-files`, which I would not want to do with my regular browser. But it seems to be the only way to debug. I have noticed, though, that Brackets' `live preview` starts a separate instance of Chrome, if I already have it running, so maybe they could add those parameters when starting it. – Mawg says reinstate Monica Apr 26 '14 at 15:33
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.

- 4,667
- 2
- 27
- 40