I am running a program through the bash terminal via WSL in Visual Studio Code. I want to debug using the built-in VS Code debugger. However, the Python debugger in VS Code runs a Windows command, even though I am using WSL. It also doesn’t look for the right Python interpreter.
I have changed the settings configuration of launch.json:
"configurations": [
{
"name": "Python: Current File",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"justMyCode": true,
"python": "/home/mptouzel/miniconda3/envs/socsan2/bin/python"
}
]
which in principle should fix the version issue (it doesn’t look like it does, so maybe I need to configure something else?), but the main issue is that it doesn’t even seem to realize I am running WSL and so in a bash terminal of course a windows command won’t work.
All the partial solutions I have found don’t seem to have any effect.