Ionic-cli: Feature Request: Allow additional browser options to be passed in when calling ionic serve

Created on 21 May 2017  路  6Comments  路  Source: ionic-team/ionic-cli

It would be very useful if the Ionic CLI allowed additional options to be passed through to the browser when calling
ionic serve --browser chrome

A common scenario when starting Google Chrome as part of development activities is for remote debugging to be enabled via the Chrome command line option
--remote-debugging-port=9222

Most helpful comment

another opportunity here is to pass --user-data-dir to enable using dedicated browser instance with its own settings (i.e. breakpoints), extensions (i.e. chrome redux dev tools) etc.

All 6 comments

Ok so these parameters should be supplied to chrome when starting via ionic serve, correct?

Yes.

The most common scenario is the need to start Google Chrome with remote debugging enabled using the command line statement:
google chrome --remote-debugging-port=9222
or
chrome.exe --remote-debugging-port=9222

@ChrisPearce Right now we don't execute the chrome binary, we just open the webpage. Interesting idea! I could explore this sometime, but sort of low priority for me right now.

another opportunity here is to pass --user-data-dir to enable using dedicated browser instance with its own settings (i.e. breakpoints), extensions (i.e. chrome redux dev tools) etc.

I thinks it's indeed a must-have.
In dev environment, I need to launch my chrome browser with security disabled "--disable-web-security --user-data-dir". I'm currently compelled to do that manually.

Was this page helpful?
0 / 5 - 0 ratings