Update 2022 Feb - VS 2022
Run on a win 10 dev machine
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Reboot!
Run on the dev machine
wsl --set-default-version 2
wsl --install -d Ubuntu
Run in your new wsl machine
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt update && sudo apt upgrade -y
sudo apt install apt-transport-https git
sudo apt update && sudo apt install dotnet-sdk-6.0 -y
Add testenvironments.json to your solution root
{
"version": "1",
"environments": [
{
"name": "Ubuntu",
"type": "wsl",
"wslDistribution": "Ubuntu"
}
]
}
Visual Studio will show a new dropdown in the test explorer, select "Ubuntu" and run or debugg your tests.

This setup does not depend on Docker. Winver shows "20h2"
Old
Debugging tests isn't supported using ".NET Core Debugging with WSL 2" extension.
This tooling does not support running tests in WSL2, but I do know our sister team has this on their backlog to enable!
.NET Core Debugging with WSL 2 - Q&A