to use visual studio code, you just install the .net core sdk. first.
https://dotnet.microsoft.com/en-us/download
after install open a terminal window:
## check installation of sdks and dotnet in path
>dotnet --list-sdks
3.1.413 [/usr/local/share/dotnet/sdk]
6.0.100 [/usr/local/share/dotnet/sdk]
## add dev cert
>dotnet dev-certs https
>dotnet dev-certs https --trust
## create a web app and open in visual studio code
>mkdir webapp
>cd webapp
>dotnet new webapp
>code .
in visual studio code be sure you have installed c# extension.
it should then ask if you want to install required assets. say yes.
then run debug