Custom Web Browser Launch Configuration - Komodo Edit 8

Hello,

I am using Komodo Edit 8 to develop a Chrome extension. Frequently I want to test my extension running Chrome in an isolated environment (not the default profile, etc. that is used whenever I start Chrome from my Desktop).

Up to now, I have been launching Chrome using a batch file as follows:

SET CHROME_DIR="C:\Program Files (x86)\Google\Chrome\Application"
SET CHROME_EXE=chrome.exe
%CHROME_DIR% %CHROME_EXE% --user-data-dir=D:\Development\Work\Web\Google\Chrome\.chrome\Local

As you can see the batch file just launches chrome using a “user-data-dir” that is isolated from my standard chrome environment and uses a specific folder to store user data.

D:\Development\Work\Web\Google\Chrome\.chrome\Local

I have recently begun using Komodo Edit 8 to develop and test my Chrome extension and I would like to continue starting/testing my Extension using Komodo Edit’s Web Browser Preview, however, I don’t see a way to create/customize my own launch configuration.

Straight out of the box it seems Komodo Edit 8 just uses the system-wide “default” launch paths/environment(s) for all the common browsers.

which ends up being roughly:

C:\User\AppData\Local\Chrome

Is there a way I can create my own custom Chrome launch configuration using the parameters above use it when launching/testing my extension or are my only options those that are provided by default?

Thank you,

Jan

The Browser Preview feature wasn’t design with this in mind, as far as I know. But you can easy run your script from within Komodo.

  • open your tool box, View menu > Tabs & Sidebars > Toolbox
  • create a new Command object, Click the gear in the corner and select New Command
  • Write the path to your script in the “Command” field.
  • Set a keybinding
  • Enjoy

Let me know if that works for you,

  • Carey

Alternatively to @careyh’s suggestion, you could try hitting “browse” in the Komodo browser preferences screen and selecting your batch file. You will need to handle arguments from your batch file though.

Komodo is hard-wired to find a static list of browser executables. If you feel like hacking - you could find/modify the koWebBrowser.py file (in your Komodo installation directory) and add your own custom browser association:
https://github.com/Komodo/KomodoEdit/blob/trunk/src/components/koWebbrowser.py#L256

and if your using a batch file, you may also need to tweak this line:

                for browser in which.whichall(exe_name, exts=[".exe"], path=bpath):
# to be this:
                for browser in which.whichall(exe_name, exts=[".exe", ".bat"], path=bpath):

Cheers,
Todd