Enable remote debugging on Chrome by default on mac? - macos

I am working on getting the VS Code debugger to attach to Chrome as part of my regular workflow.
I keep Chrome running all the time, and the highly-regarded VS Code Live Server extension opens my project in a new tab, which I like. I would like to be able to attach the VS Code debugger to this instance, but it looks like I have to start Chrome from the command line with
sudo /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222
Several questions:
Is there a way to modify Chrome's configuration file so that it always starts with that flag set?
Is that a stupid thing to do?
Do I really need the sudo in the line above? Some sources do not have it.
Alternatively, is there a way to create a desktop/toolbar shortcut to chrome that will start it will remote debugging enabled?
Thanks!
PS I see the related SO question for Windows.

There are various Mac answers that used to work that don't anymore. I found one that does and built a double-clickable icon. I posted it on GitHub.
Apparently it's also pretty easy to do using Automator.

Related

Can't open terminal in VSCode Python on macOS

I can't open my terminal in VSCode for some reason. Whenever I try to open it, it immediately closes. I can open the other parts of my console like "problems" or "output" but not terminal.
I saw a bunch of comments from people who experienced the same issue previously about changing their settings.json, specifically the osx profiles part, but it didn't work for me. I was trying to run and debug a python code I wrote through flask when this problem occurred. Here's my settings page.
my settings.json page
I also deleted all the codes in between the parentheses to get the default settings because I saw some other people do it on here, but that didn't work either. What can I do?
I use macOS 12.0.1.
I'm 15 and have just started learning back-end development on my own, so I would really appreciate if you guys could provide a "results" code snippet or image so that I can check whether I'm doing it right.

Is there a Microsoft Edge equal of chrome --app to open a web app in msedge from command line

I want to open jupyter lab as a web app in Microsoft Edge. Like it is possible in chrome.
I've looked for configurations in firefox but they either don't support localhost or they are complex by making a new profile.
If you have the website link of the app, you could use the code below via Command Prompt (cmd) to open it in Microsoft Edge:
start microsoft-edge:http://www.google.com
The result is like below:
Late into the question, but: Basically
"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --app="https://www.google.com"
... works. this can also be put into a shortcut and it shows up with an own icon in the Taskbar this way.
The exact same way it works if you first create a shortcut e.g. on your Desktop, starting with
"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe"
changing it to the initial example from above via the shortcut properties... this will still miss the "correct" shortcut icon for the "app", anyway, it works.
BTW.: I also used Firefox for this, unfortunately they dropped support for --web-app cmd support in early 2021 ;/

Why the vs-code terminal is not working internally?

The vs-code terminal is not working as an integrated terminal but as I click
New Terminal
It opens cmd.exe as an external tool.
I tried checking the settings but it was integrated as before but yet the problem is still there.
I am getting this message.
The terminal process terminated with exit code: 3221225786
i have the exact same problem and i am pretty sure i have not made any relevant changes...
In the mean time Ive found a temporary fix or at least it works for me: go to settings and search for "conpty", in the "terminal>integrated: windows enable conpty" section uncheck the "whether to use ConPTY..." and the integrated terminal works as before
looks like it is a bug: https://github.com/microsoft/vscode/issues/73790
Turn off the checkbox "Windows Enable Conpty".
This is highly recommand for error exit code '3221225794' when i open the terminal in VSCODE.

Firefox new debugger - Where did the file tab go?

Feel really stupid for asking but where did the file tabs in the debugger go? I can only open one file at a time. If I try to open another one, the file content is simply replaced with the new file. If I revert back to the old debugger, then I have a file tab for each file I open.
Using Firefox 53.0.3 (64-bit) on Ubunto 16.04LTS
You're actually using the old debugger UI. It's the new frontend that allows to open several files at the same time and looks like this:
To toggle the new debugger UI, go to about:config and set the preference devtools.debugger.new-debugger-frontend to true.
You may also check whether browser.tabs.remote.autostart.2 is set to true, which controls whether Firefox runs in multi-process mode.

How to disable Firefox Safe Mode...any way possible

I run a lot of automation using Firefox driver, and it takes a while (20-30 minutes). Naturally, while its running, I continue to work on something else.
However, while I doing things, I occasionally press the Shift key while a new Firefox instance is starting up. However, Firefox has hardcoded that it will boot in safe mode if you are holding shift, which then freezes automation in its "Are you sure you want to boot in safe mode?"
Here's the different options I've considered:
When I first ran into this, I thought that it was an issue with Firefox crashing multiple times. I changed toolkit.startup.max_resumed_crashes to 99999999 and browser.safebrowsing.enabled to false, both manually, and in my FirefoxProfile
I've tried this and this, both of which apparently refer to an old version of firefox, because the files they describe no longer exist.
This doesn't sound like it will work because profiles don't have anything to do with Safe Mode and I can't execute any AutoIt code because Selenium is still maintaining control as its frozen with the popup.
Running Firefox 3.6 or lower is not an option. Running headless is currently in the works (using Phantom), but we'll never stop running it with firefox. The same is true for the Grid (and I like running it local so I can actually see it run).
I've run into this enough times that I'm pretty desperate for any solution...whether that means changing something in my code, firefox settings, some files in the firefox folder, or even some AutoHotKey script (which I've considered, but don't know how it would work).
Thank you!
This solution you mentioned seems to work well for me even with the newest Firefox 22.
The omni.ja file is the one you want to unpack. It is a regular zip file.
Inside it:
Simply unpack, change the file, repack, save. Worked for me.

Resources