Everytime I start karma with for testing, a new instance of browser is opened (Firefox in my case).
This is annoying because it pops out over the other windows (I am using windows 8).
Is there any karma configuration to make it start minimized? Or maybe another solution which would solve my problem.
The best I've found for Chrome is to set the window-size. It still maximizes but at least you can quickly hit the Restore button to resize it to a small window. I couldn't find an option to not open maximized http://peter.sh/experiments/chromium-command-line-switches/
Here's the Karma config:
browsers: ['Chrome_small'],
customLaunchers: {
Chrome_small: {
base: 'Chrome',
flags: ['--window-size=400,400']
}
}
Building off of #Jeff Sheets great answer, you can position the window off the screen using the --window-position flag, so it's at least out of your way if not actually minimized. It's also good for multiple monitor situations:
browsers: ['Chrome_small'],
customLaunchers: {
Chrome_small: {
base: 'Chrome',
flags: [
'--window-size=400,400',
'--window-position=-400,0'
]
}
}
Firefox
No, you cannot at the moment.
There's an issue on the repo for that but it hasn't been closed yet.
While it is possible to pass some user preferences, there's not yet the option to pass the -tray command line option described here.
Chrome
Update 2022; below causes errors, like:
Chrome failed 2 times (cannot start). Giving up.
You can definitely add flags to the Chrome launcher configuration.
I'm not sure you can do what you are looking for tough: the only thing I found is the --no-startup-window flag.
Add it to the launcher configuration section and let us know if it works for your purpose.
Have a look at the launcher documentation to see how to add flags.
Consider ChromeHeadless. Comes with the karma Chrome launcher.
browsers: [
'ChromeHeadless'
]
Related
In Visual Studio Code when I open the application I have to re-open the integrated terminal window every time.
Do you know the steps to have the CLI pane open as soon as the application loads by default without manually doing ctrl-backtick every time?
You can try the following:
Install an extension: Auto Run
Command.
Reload Visual Studio Code after installation.
In settings ctrl+, add following:
"auto-run-command.rules": [
{
"command": "workbench.action.terminal.new",
},
],
No built in way to do this , however you can submit a feature request here.
Or wait for this extension to mature.
I'm new, so I can't post comments yet. But I think an improvement to the solution offered by #victor-s is to use workbench.action.terminal.toggleTerminal, since that won't create a new terminal if one is already open.
I have tried changing the settings for "terminal.integrated.shell.windows" to babun mintty location. But the babun shell window opens separately and doesn't integrate with the VS code. Anyone knows how to achieve this?
After trying for 2 hours finally made it work.
Before reading my way of doing this, you might want to got through this issue first.
By default babun is installed in C:\Users\13000\.babun\. So we can configure it by overriding user setting in VS Code as:
"terminal.integrated.shell.windows": "C:\\Users\\YOURUSERNAME\\.babun\\cygwin\\bin\\zsh.exe",
After saving , reload the window and you are done.
You will get something like :
Hope this helps!
I was searching for any solution for this issue before and I could not find any. But I was curious how Babun itself run the command "Open Babun here" from right-click menu and noticed it runs this command:
C:\Users\YOURUSER\.babun\cygwin\bin\mintty.exe /bin/env CHERE_INVOKING=1 /bin/zsh.exe
I've tried setting mintty.exe as shell and using leading commands as shell arguments, but this method opens an external terminal. I've noticed this behavior is because using mintty.exe, so I replaced mintty.exe with env.exe itself. At last, these are the settings:
"terminal.integrated.shell.windows": "C:\\Users\\YOURUSER\\.babun\\cygwin\\bin\\env.exe",
"terminal.integrated.shellArgs.windows": [
"CHERE_INVOKING=1",
"/bin/zsh.exe"
]
Edit: This might not completely relate to this question, but because of having the similarity, I think it might worth mentioning.
During my search for a solution, I've seen many other questions about the same issue for integrating Atom's PlatformIO IDE Terminal package or JetBrain's IDEs with Babun's zsh.
In the case of Atom, setting the Shell Override to C:\Users\YOURUSER\.babun\cygwin\bin\env.exe and Shell Arguments to CHERE_INVOKING=1 /bin/zsh.exe opens zsh.exe as an integrated terminal in the project directory.
In the case of JetBrain, I've used WebStrom and this works:
cmd.exe "/k C:\Users\ehsan\.babun\cygwin\bin\env.exe CHERE_INVOKING=1 /bin/zsh.exe"
Just complementing the correct answer that Pramesh Bajracharya gave above, you can override user settings in VS Code opening the VS Code and going in:
File->Preferences->Settings
And then paste in the field shown in your right side (WORKSPACE SETTINGS):
{
"terminal.integrated.shell.windows": "C:\\Users\\YOURUSER\\.babun\\cygwin\\bin\\zsh.exe"
}
More information can be found in https://code.visualstudio.com/docs/editor/integrated-terminal
Thanks Pramesh Bajracharya!
What I'm doing
I am using the instructions on this page to generate a Hello World extension for Visual Studio Code. I've generated the extension using Yeoman and am now simply trying to launch the hello world extension in an Extension Host instance of VSCode using the debugger by hitting F5.
The problem
I am receiving a notification at the top of the original VSCode window that reads, "Error cannot connect to runtime process (timeout after 3000ms) launch.json | Close".
This error appears slightly before the Extension Host window opens.
Once the extension host window opens, it spins a bit and then shows this warning at the top of its window:
The warning reads, "warn plugin host did not start in 10 seconds, it might be stopped on the first line and needs a debugger to continue | Close".
Seems like I just need some way of making the runtime timeout longer but I haven't found out how to do this.
My environment:
OSX 10.10.5 Yosemite
Node 0.12.7 or 4.2.1 (I've tried both)
Visual Studio Code 0.10.1
EDIT: This only happens when using Typescript in the Yeoman generator. I tried the Javascript version and it works fine.
Given that this seems to be a bug, I've opened this Github issue with the code yeoman generator.
It's simple but I spent 1 hour to find the issue.
I think mistake I did is first I created launch json and installed chrome debugger and then I modified launch.json for chrome launch so did not work.
So I tried below and it worked.
Deleted launch.json and reinstalled chrome debugger extension and
restart visual studio code and create lanch.json after these steps it worked :)
Try it may work.
This happens to me as well. I simply reload the extension by pressing F5 again and it usually works. Rarely it will fail twice in a row and then will work on the third time.
Not really a "solution" to the problem, but it's worked so far.
Find %VSCodeHome%\resources\app\extensions\node-debug\out\node\nodeDebug.js and change wait time in line 203.
// try to attach
setTimeout(function () {
_this._attach(response, port, 3000);
}, 2000);
into time working for you, like:
// try to attach
setTimeout(function () {
_this._attach(response, port, 10000);
}, 2000);
Worked for me.
Accessing the Internet through a proxy may also cause this. It's due to the source map downloader doesn't use your proxy, so the download always times out after attempting to connect for a long time.
For those who encounter this, try the workaround here.
I am also running into this same error, but I'm seeing this with the example language server example repo that's in the documentation: https://github.com/Microsoft/vscode-languageserver-node-example
Hey there I've been using the JetBrains IDE support extension for a week now, and While it is great utility. I grow tired of clicking the "X' in the Chrome Yellow Warning ("JetBrains IDE Support" is debugging this tab.)
This may be a noobish question for experienced devs, but does anyone knows how to get rid of this Chrome pop-ups?
Thanks :)
Here is a snapshot:
You can disable this warning in chrome://flags using the Enable Silent Debugging flag:
It's mentioned in the comment #28.
Here is the direct link to the option:
chrome://flags/#silent-debugger-extension-api Just paste this to your Chrome addressbar.
For the ones who didn't understand ( like me :P )
You need to open this address chrome://flags in Google-Chrome and Enable Silent Debugging
While the relevant flag has been removed from chrome://flags, you can still use the command line switch:
chrome --silent-debugger-extension-api
which can be persisted in your flags config (eg. ~/.config/chrome-flags.conf on linux).
See Enable Silent Debugging is not available in Chrome browser
For the newer versions of the Chrome this flag is not available anymore.
So Here is the solution
Open settings in your IDE then head into Tools>Web Browsers
then click on Chrome and hit the pencil icon and
write this in "command line options" finaly hit ok
--silent-debugger-extension-api
now close your chrome if it is open then try to launch it again using debug or run...
When I launch google apps[which is developed by myself] from command line, for example:
chrome.exe --load-and-launch-app="C:\Users\KyawKhaing\Desktop\chrome\Chrome App\Example2"
After I run this, I see Google Chrome Browser open first follow by my google chrome apps launch. I don't want to open google chrome browser when I launch a chrome app. Any one know the solution. Is it possible?
Use the --silent-launch argument.
chrome.exe --silent-launch --load-and-launch-app="C:\Users\KyawKhaing\Desktop\chrome\Chrome App\Example2"
As I was running automation scripts in java, i did notice that chrome did not open using command prompt.
Runtime.getRuntime().exec("C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe \"http:\\www.google.com\"");
From Windows 7, I fixed the problem with the following steps:
Go to the folder C:\Program Files (x86)\Google\Chrome\Application
Right-click on chrome.exe
Select Properties
Select the Compatibility TAB
Click on the "Change settings for all users" button
Make sure to put a Check Mark on "Run this program in compatibility mode for:" and
Select "Windows 7" from the drop down list.
Enjoy!
I don't think you can do it currently. It is a reasonable feature request! You can make feature requests at http://crbug.com/new
There is a bug already logged for this, see http://crbug.com/175381.
We are working on making app background pages keep the browser process alive; once this is done we can fix this bug. The problem currently is due to the way the process is kept alive - if we don't show the browser window the process exits between loading the app and the app opening a window.
I don't think you can do that. The browser is the environment of the app. Its like trying to run a windows app, without running windows. The app depends on the browser. You can't open the app without opening the browser first. Sorry. Hope this helps.