Using Chrome command line args --window-workspace not working - macos

I'm trying to configure puppeteer to launch Chrome on a specific screen (or workspace) on macOS. I've found the --window-workspace CLI argument but it doesn't work. I tried every number from 0 to 10 (the number of workspaces I have on 3 screens), and the Chrome window shows up in the same workspace.
/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary --window-workspace=3
Is there a different way of identifying the workspace?
This is especially useful when working with multiple monitors and debugging puppeteer with headless mode turned off, having the ability to designate a screen where the window shows up would better the developer UX.

Related

Is it possible to have multiple tabs in one PowerShell terminal window on Windows 10?

I need to work with several terminal windows simultaneously, and it's very inconvenient to constantly have to switch between different terminal windows. Is there a way to have multiple tabs in one window? I know it's possible on macOS and Linux, but can't figure out how to configure that on Windows 10.
Yes.
You can use The new Windows Terminal or VSCode Integrated Terminal.
Windows Terminal:
In the new terminal app, you can have multiple PowerShell profiles as tabs.
so that you can work with several terminal tabs simultaneously.
The UI looks like browser tabs. You can download it from the Microsoft store or Github.
screen snip of powershell profiles in Windows ternmial downloaded from Microsoft store.
VSCode:
In Visual Studio Code, open New Terminal from Terminal Menu on Top bar.
On the right, you can Maximize panel size and can choose the terminal profiles.
The best thing about this vscode terminals is...
Along with seeing them as tabs in the right side, you can split them side by side and work on them at same time.
snip of multiple Powershells and other profiles in VSCode Integrated terminal panel maximized

Starting Chrome on macOS from the Finder with extra command line parameters

I want to stuff remote debugging and other esoteric dev-only only parameters to the Chrome application when it starts but I want it to be always there, including when I click on the app icon.
E.g.:
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222
How do I pass these command line parameters to the app directly?
I ended up creating an automator application with as shell task. Customized the icon and replaced Chrome.app with the new app in the dock.
I am still looking for a way to change the settings in Chrome so it can connect with remote debugger "on-demand" for specific tasks (not everything as it is set now) but that doesn't seem to be possible at this time. The VSCode folks have apparently solicited the Chrome team to provide this functionality. Stay tuned...

Show Firefox OS devtools on Firefox Developer Edition 'desktop'

I've an iMac with OS X Yosemite v.10.10.3. I use Firefox Developer Edition 40.0a2. I've a ZTE Open C (FR version) with Firefox OS; Boot2Gecko 2.1.0.0-prerelease (B2G OS).
What I'd like to do is the following: I've a basic webpage (mostyl HTML, CSS and JS) opened in my browser on my Firefox OS phone. I'd like to get the devtools (Cmd+Shift+i) and be able to edit that webpage with my Firefox Developer Edition browser on my iMac.
I've already tried these things:
Use webIDE.
Follow this potential solution.
Connecting a Firefox OS device.
WebIDE Troubleshooting.
Comment déboguer facilement du web y compris sur tablettes et téléphones—french article.
With webIDE, I can build a new app for Firefox OS (with or without a base theme) and I can use the devtools to inspect the DOM and stuff like that. I just want to achieve the exact same thing but directly on my desktop computer.
Do you have any clue?
Feel free to ask me if you need more piece of informations. ;)
Current status
When I launch the Firefox OS browser app, I can inspect (via the devtools) the homepage (DOM stuff, etc.). But when I load another webpage (Google for example), I can't inspect the DOM. Any idea about that?
I often get this message: http://puu.sh/ir2Ju/32563e51bc.png when I switch to several apps I want to debug.
If I understand correctly, you're trying to connect the Firefox Developer Edition WebIDE on your desktop to a tab that is open on your Firefox OS phone. Something like this?
If that's right, once you connect to your phone in the WebIDE, you should see a list of open browser tabs at the bottom of the "Open App" menu, which is in the top left of the WebIDE panel.
When you connect your phone, you have to accept remote debugging.
Then on the left of the window, you should see a dropdown menu with the apps that you can debug. By default, you can only debug unprivileged applications.
Click on the app, the you want to debug and in the middle of the screen click on the "wrench". It is the button to activate debugging.
Now the complicated part. In order to debug privileged apps such as the web Browser. You have to root your phone and change some preferences. To check that you have a rooted phone. Click on the runtime menu and then runtime info.
If your adb is in root mode, then you can press the button to request higher privileges. You can also do that by hand.
There for more info:
https://developer.mozilla.org/fr/docs/Tools/WebIDE/Running_and_debugging_apps#Unrestricted_app_debugging_%28including_certified_apps.2C_main_process.2C_etc.%29
https://developer.mozilla.org/en-US/Firefox_OS/Using_the_App_Manager#Using_the_B2G_desktop_client
Using a real device
On your computer, enter the following command in Terminal/console to enter your device's filesystem via the shell:
adb shell
Your prompt should change to root#android. Next, stop B2G running using the following command:
stop b2g
Navigate to the following directory:
cd /data/b2g/mozilla/*.default/
Here, update the prefs.js file with the following line:
echo 'user_pref("devtools.debugger.forbid-certified-apps", false);' >> prefs.js
After you've finished editing and saving the file, start B2G again using the following command:
start b2g
Exit the android filesystem using the exit command; this will return you to your normal terminal prompt.
Next, reconnect to the App Manager and you should see certified apps appear for debugging.
When this is done, you should see the application "Browser" in the list of available apps for debugging. At the same time, you should see all other application of your phone available as debugging.

Is it possible to run 2 firefox instances one in safe mode and one not

I love firebug for helping debug my web apps, as well as seeing how others have implemented there sites. However firebug hinders memory leak testing.
I've just found that FireFox can be launched in safemode which disables all addons, which is great for memory usage testing however once firefix is launched (either samemode or not) all subsequent firefox launches (they all appear in task manager as 1 firefox instance) will use the mode of the first one.
I'd like to leave one in same mode testing some apps for leaks and use another with firebug to develop.
I've tried making a copy of the FireFix.exe and even copying the whole firefox directory but it still launches as one application.
I could always use VirtualBox to create a full virtual PC for this testing but that seams like a large overhead.
Edit
I have just tried the -no-remote switch but it just comes up with "firefox is already running .... you must first close the existing Firefox process.... "
First close all your Firefox instances. With all instances closed, run firefox via the "Run..." dialog on windows, typing "firefox -p". It will open with the profile manager, where you can create multiple profiles with different configurations.
After creating your profiles, just run you "main" browser using "firefox -p" and select your "main" profile. To open another instance using a different profile, run Firefox using "firefox -no-remote -p" and it will prompt the profile manager again, so you can choose a different profile.

Can I emulate previous versions of Firefox within Firefox 4.0?

The Developer Tools in IE 8 (and 9) allow switching Document and Browser Modes to previous versions. Is that possible with Firefox 4?
No it is not possible. It is possible to change the User-Agent string using the Add-on User Agent Switcher, but it does not change the behavior of the Javascript engine.
Having two Firefox versions installed at a time is possible. Just choose a different installation folder. When running Firefox, use different profiles and pass the --no-remote option to prevent a new window being opened with the active Firefox application.
For example, you can create the profile "firefox36" and "firefox4" and run these using:
"%ProgramFiles%\Firefox 4\firefox.exe" --no-remote -P firefox4
"%ProgramFiles%\Firefox 3.6\firefox.exe" --no-remote -P firefox36

Resources