Default debugger on VSCode - visual-studio-code

I have installed GCC/MinGW on MacBook M1 using Homebrew. However,on opening VSCode and running C files, I have to go an extra step and select the debugger I want. Is there any way to make GCC default on VSCode?

Related

debugger option C++(GDB/LLDB) is not avaliable vscode windows

I am trying to set up the debugger following a course in C language development. the option of the C++(GDB/LLDB) is not avaliable it is not showing in the command line pallet
vscode version 1.71.0
windows 10
cygwin64 installed
what am I missing to have that option for debugging.

does mingw-w64 work in vscode for Mac m1?

I installed mingw-w64 using homebrew on my Mac m1 and then in vscode I installed the code runner extension as the tutorial said but it doesn't run my code after I press the command "cmd+opt+n" , nth seems to work.

Intellisense autocomplete not working for wsl in vscode

I've been setting up vscode as an IDE for python development. I use windows subsystem for linux with my python packages installed through anaconda there.
My problem is that auto completion does not work as expected. For examples, outside of wsl if I am using the numpy package I can get autocompletion:
Autocomplete outside of wsl
However, inside of wsl autocomplete does not find numpy.linalg (as in example above):
Autocomplete inside wsl
Thanks in advance!
edit: I am currently using wsl1 if that information is relavent!
As mentioned by #Adriana Hernández you need to install the extensions inside WSL too.
The VSCode WSL docs are covering these here
In short if you go to the extensions tab, you shall see Python marked with "Install in WSL...". Once clicked install and reloaded, it should work.
If not you likely need to pick another interpreter (likely the one from your venv.)
hit Ctrl+Shift+P then
Python: Select interpreter
then select the desired python interpreter (most likely the one in your venv which has all the packages)
What works for me is creating a venv, activating then launching VSCode from WSL with code .
On the first time you will need to install your extensions to WSL, but then it should be good to go.

Line number of edit window not showing in interactive window using Visual Studio and conda enviroment

I created a python project with Visual Studio, expecting to develop with conda and ipython, so I set the enviroment to Conda, and made sure to check the ipython within it...
I am expecting the following result, which has references to line numbers in the interactive window:
Turns out that i am getting this (without the line number):
What am I missing to achieve the desired result?
For this walkthrough you should have the Anaconda environment installed, which includes IPython and the necessary libraries:
Open Visual Studio, switch to the Python Environments window (View >
Other Windows > Python Environments), and select an Anaconda
environment.
Examine the Packages (Conda) tab (which may appear as pip or
Packages) for that environment to make sure that ipython and
matplotlib are listed. If not, install them here. (See Python
Environments windows - Packages tab.)
Select the Overview tab and select Use IPython interactive mode. (In
Visual Studio 2015, select Configure interactive options to open the
Options dialog, then set Interactive Mode to IPython, and select
OK).
Select Open interactive window to bring up the Interactive window in
IPython mode. You may need to reset the window if you have just
changed the interactive mode; you might also need to press Enter if
only a >>> prompt appears, so that you get a prompt like In [2].
https://learn.microsoft.com/en-us/visualstudio/python/tutorial-working-with-python-in-visual-studio-step-01-create-project?view=vs-2019

Visual Studio Code can't run in Ubuntu 18.04

I have been using VSCode for a while and never had any big problem with it. Today I tried to start my VSCode from left taskbar on my Ubuntu 18.04 and it not showing up. Also, I tried to run in terminal as 'code .' again nothing.
VSCode version is latest 1.23.1 I tried few time today with install/remove and nothing. Somehow I am thinking maybe it something with permissions but not sure.
When click on task bar icon its shows like loading on top taskbar in ubuntu 18.04 for a few seconds and stops.
Also when tried to run in terminal as:
$ code . --verbose
[15027:0603/191139.702752:ERROR:browser_main_loop.cc(279)] Gtk: Locale not supported by C library.
Using the fallback 'C' locale.
[15027:0603/191139.809312:ERROR:browser_main_loop.cc(279)] Gtk: GModule (/usr/lib/x86_64-linux-gnu/gtk-2.0/2.10.0/immodules/im-ibus.so) initialization check failed: GLib version too old (micro mismatch)
[15027:0603/191139.809326:ERROR:browser_main_loop.cc(279)] Gtk: Loading IM context type 'ibus' failed
pcilib: Cannot open /sys/bus/pci/devices/0000:07:00.0/resource: No such file or directory
just getting an error, but not sure is this error connected with problem I did some investigation and Gtk is already installed and works well on my OS.
Fixed it with "delete the /home/user/.config/Code folder"
https://github.com/Microsoft/vscode/issues/55774#issuecomment-412774473