Modify Chrome command line for default browser in Windows - windows

In order to debug a crashing extension, I need to modify the command line which is used to launch Chrome from another application as a default browser in Windows. I want to add the logging argument --enable-logging --v=1

Command line can be modified in the registry:
HKEY_CLASSES_ROOT\ChromeHTML\shell\open\command

Related

How to launch Chrome browser instead of Chromium in Taiko

How to launch a Chrome browser instead of Chromium in Taiko? I am unable to launch Chrome or another Chromium-based browser.
You can install chrome (or any chromium based browser), and these environment variables :
TAIKO_BROWSER_PATH - set this to the location of the browser executable (in this case chrome's path)
Additionally, you may set TAIKO_SKIP_CHROMIUM_DOWNLOAD to speed up taiko install, if you do not plan to use the bundled chromium.
ref: https://docs.taiko.dev/#taiko-env-variables
In windows command prompt, you can use like:
set TAIKO_BROWSER_PATH=/path/to/chrome.exe
taiko
When taiko is launched, it will display the path of the browser.
One more thing, each time you open a new cmd prompt, you need to set the TAIKO_BROWSER_PATH env variable. Or you need to set it permanently in windows global env variables.

Flask debugger not appearing in browser

I'm trying to use the flash debugger, where I made a mistake on purpose to test out the debugger. Whenever the error is shown it is only shown in the terminal, and I can't access the localhost to test it.
I have
app.debug = True
But it only shows the stack trace in the terminal when I run.
flask run
when I run
python routes.py
I see the line where the error happened.
But how can I see the interactive debugger in the browser window?
Try setting the environment variable FLASK_ENV=development
This seems to be the suggested way to enable interactive debugging and other nice to have development features when using the flask run command.
Alternatively you can set FLASK_DEBUG=1 to just enable the interactive debugger

Can't execute .exe with an additional param using the .bat file

I need to run NetBeans 7.4 with an additional param such as --locale en:US.
I have no problems doing this using wingows 7 console like this:
>b:
>cd "Program Files\NetBeans 7.4\bin"
>netbeans64.exe --locale en:US
But this way is very cumbersome. Besides it closes the program itself if I close the console.
So I tryed to make a .bat file with the following content:
#echo off
echo Netbeans
start "netbeans" "b:\Program Files\NetBeans 7.4\bin\netbeans64.exe --locale en:US"
pause
exit
However this solution doesn't work. It tells that it can't find this file. If I remove the param '--locale en:US' it founds it. But it is necessary to use this param.
Something should be changed, but how?
Almost done. Just change where the quotes are placed
start "netbeans" "b:\Program Files\NetBeans 7.4\bin\netbeans64.exe" --locale en:US
And, for the console problem, from netbeans launcher documentation
Default behaviour - parent process console is attached. This means if
netbeans.exe is started from console it is "reused" for output, if
netbeans.exe is started by shortcut no console is created
If option "--console new" is specified netbeans.exe creates new
console for output. This is useful if you want to start NB by
shortcut and you want still see console output or if you need to
start several NB instances with different user dirs. Console window
will have correct icon and corresponding title e.g. netbeans
--userdir d:\test_userdir --console new) so it is easy to distinguish which console belongs to certain NB instance
If option "--console suppress" is specified no output will be written
to console you invoke it from
In this moment i have no access to netbeans installation to test, but it seems there are three ways
Start with --console new so netbeans gets its own console and do not depend on cmd
Start with --console suppress to dettach from console
Create a shortcut to netbeans (with your parameters, of course). If it is necessary to start netbeans from console, start the .lnk file (shortcut) instead of netbeans executable.
As said, i can not try. Maybe this works.

Run a command without the command line running in a new window

I am trying to run a command from a node.js app that's installed on the machine. The command runs fine (it is a command to launches Tomcat). However, the command I run actually open the command line window that is launching Tomcat. Is there a way to do the same thing (run the same command to launch Tomcat) but without the command line window opening up?
Let me know if you need more info!
Your problem isn't with node.js but rather with tomcat. You are probably running the wrong command.
instead of calling catalina.bat start, rather call catalina.bat run.
alternatively you can set it up as a service and call net start tomcatX

PHP debugger for Vim: Debug Commandline scripts

My vim debugger requires me to set an Xdebug cookie in my browser, by appending ?XDEBUG_SESSION_START=1, after which I can start debugging.
But I cannot set this cookie/session when calling a script on the CLI.
How does one debug commandline php-scripts with vim?
I have not found all the pieces for this puzzle in one convenient place, so here's my slightly-more-complete solution. This works for me with vim 7.3, xdebug 2.0.
Get the debugger vim plugin
The debugger.py file goes in .vim/plugins, which pathogen does not do automatically.
Use F5 to start vim listening for incoming xdebug connections (on port 9000 by default)
Use the right xdebug-related settings in php.ini (use an alternate php.ini, perhaps).:
[Zend]
zend_extension = /full/path/to/xdebug.so
xdebug.remote_enable = 1
xdebug.remote_port =9000
xdebug.remote_host = localhost
; We have to turn on remote_autostart when running php from
; cli. That's probably a good reason to keep the cli and apache
; versions of php.ini distinct.
xdebug.remote_autostart=1
; idekey can be just about anything, but the value in php.ini needs
; to match the value used in the environment that launches php.
xdebug.idekey=vim_session
When launching php script from the command line, preset the idekey environment var in the form
export XDEBUG_IDEKEY="idekey=vim_session"
Press F5 in vim to start listening on the remote_port
In the shell with the XDEBUG_IDEKEY value, start php with "php {scriptname}"
So php loads php.ini, finds the xdebug.so extension, which is initialized with those php.ini settings. The xdebug extension intercepts the script execution and tries to connect to localhost:9000, which is where the vim+python extension is listening. Once a connection is established, the xdebug extension coordinates the debugging session, and the vim plugin puts up a bunch of ide-like debugging windows. Voila!
Bonus link: I also use this shell script to launch php. It waits until it sees vim open the debug port, and then starts the php session. Upon completion, it prints the result code and loops back for another run (unless you hit ctrl+c, of course).
I think you will find your answer in the docs (search for Starting The Debugger).

Resources