Can't open terminal in VSCode Python on macOS - terminal

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.

Related

Clear terminal without clearing first line of multi-line prompt

I'm trying to setup the terminal on my new Mac to match the behavior of my old Mac, however I have run into an issue with my multiline prompt that has me stumped. I remember having this issue when I setup my old Mac several years ago, however I don't remember how I solved it.
My prompt (without color) looks like this:
╭─username ~ 130 ↵
╰─
When I press ⌘commandK in iTerm2 on my old Mac it clears the terminal window so that both lines of the prompt are shown at the top.
When I press ⌘commandK in iTerm2 on my new Mac it clears the terminal window so that only the second line of the prompt is shown at the top.
I have tried checking everything I could think of, I have checked:
Every dot file/directory in my home directory (copied them to the new Mac).
iTerm2 settings.
System settings (primarily keyboard shortcuts).
Various websites with instructions about setting up multi-line prompts.
Interestingly I have discovered that if I type clear iTerm2 will clear the screen and leave the top line showing on both Macs. However it first clears the entire screen, including the prompt, before bringing the prompt back (looks bad imo). However since it works differently ⌘commandK does I don't think that's what my old Mac is doing.
It's possible that I installed some program/script that somehow does this, but if so I'm not finding it locally or referenced online.
Does anyone know how I can get ⌘commandK working to clear the screen while keeping the top line of my prompt? I still have the old Mac so I can check/compare anything on it to the new Mac if there are any guesses about what settings I changed.
Edit:
I was able to find something that worked, however if anyone has any other suggestions I'll be happy to try them and accept any that I can make work that are less hacky than this (e.g. don't require another 3rd party app).
Edit: This doesn't work while a command is running, nor does it clear the scrollable history. So it's better than nothing but still doesn't behave like I want it to.
After coming back to my question SO associated a new question with an answer I was able to make work, although it feels extra hacky and wasn't what I had working before.
I found this answer which suggests using ⌃controlL to clear the screen. That does exactly what I want it to do (leaves the top prompt visible and doesn't flash) but with the wrong keybinding. Fortunately I was able to use an app I already have installed (BTT) to make ⌘commandK map to ⌃controlL only in iTerm2.

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.

Problem with integrated terminal in PhpStorm

I'm learning Laravel, and also I started learning it with(for me) new editor - PhpStorm. I want to edit my terminal(not colors, fonts, etc.). I integrated the gitbash instead of factory terminal that comes with PhpStorm.
The problem is that I'm having some'? ' with a number, usually '32m' before the statements in my terminal. To explain it better, here's a screenshot:
And for example, everyone that I've seen on google, using PhpStorm have 'normal' editor without those symbols and numbers before each line in the terminal.
My terminal atm :
Tried searching JetBrains FAQ, googling and ofc here on StackOverflow, but no luck for me.
What would I like my terminal to look like https://i.stack.imgur.com/oh3Vv.jpg
What it's missing is the ANSI support for color codes. As a result you see those strange characters as these aren't parsed and therefore displayed as output.
Maybe you could try with a little utility like ansicon. For further details take a look at this article (outdated but might work anyway)

Enable remote debugging on Chrome by default on mac?

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.

PhpStorm keeps opening default macOS terminal

I'm not sure this is the right place to ask this but I need some help setting up the terminal in PhpStorm...
I recently switched to macOS (before that I was a Windows user) and installed PhpStorm and set everything up as I wanted except I ran into a small problem that is not really a problem but more of an inconvenience...
Every time I open the terminal in PhpStorm it opens the macOS terminal but I want to use the one in the IDE.
What settings do I have to change or where have I messed up that this is happening?
Those are the settings in PhpStorm:
P.S. Sorry for bad English it is not my native language.
Just change Shell path back to /bin/bash.

Resources