Whenever I launch Karma on Chrome a new Chrome window pops up. When I bring up the console on this Chrome Window the console comes up attached to the right side. I prefer the console attached to the bottom so I always bring it down - its kind of annoying.
How can I get Karma to launch Chrome with the console docked at the bottom?
Open the Command Menu. Run one of the following commands: Dock to left , Dock to right , Dock to bottom , Undock into separate window or Restore last dock position . To toggle Restore last dock position with a keyboard shortcut, press Control + Shift + D (Linux/Windows) or Command + Shift + D (Mac).
Pressing Ctrl + Shift + D will dock all devtools to left, right, bottom in turn.
1) Press Command+Option+J to open the console. 2) Press Command+Option+D to move the console to another position.
In the developer tools, klick the cogwheel icon (or press F1 when focusing the dev tools) to open the settings overlay. Under "Preferences", in the "Appearance" section, find the "Panel layout" option. Set it to your liking.
It seems that there is no straightforward way to do that.
Although you could specify custom launcher options for Chromium, there is no option that controls devtool position. (Though there is --auto-open-devtools-for-tabs
that can also be handy in your case.)
However, there's a nice hack described in a related issue:
A brute force approach is to pass the
--user-data-dir
flag to a custom launcher:
browsers: ['Chrome'],
customLaunchers: {
Chrome_DevTools_Saved_Prefs: {
base: 'Chrome',
flags: ['--user-data-dir=./tests/config/.chrome_dev_user']
}
}
then
karma start --browsers Chrome_DevTools_Saved_Prefs
This will allow you to reuse the profile. When you want to test using a fresh profile, use the default Chrome launcher or wipe the user-data-dir.
UPDATE: as @KFunk points out, this case is covered in Karma's documentation in a bit nicer way:
customLaunchers: {
Chrome_with_debugging: {
base: 'Chrome',
chromeDataDir: path.resolve(__dirname, '.chrome')
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With