Visual studio code can't debug csharp code

Godot Version 4.2 mono


Hey all , sorry if its not directly related to the engine but to the IDE
i try to debug simple scene with vscode , this is my configuration file :

    // See
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
            "label": "build",
            "command": "dotnet",
            "type": "shell",
            "args": [
                // Ask dotnet build to generate full paths for file names.
                // Do not generate summary otherwise it leads to duplicate errors in Problems panel
            "group": "build",
            "presentation": {
                "reveal": "silent"
            "problemMatcher": "$msCompile"


    "version": "0.2.0",
    "configurations": [
            "name": ".NET Core Launch (console)",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
            "program": "C:/dev/my/godot/Godot_v4.2-stable_mono_win64/Godot_v4.2-stable_mono_win64.exe",
            "args": [],
            "cwd": "${workspaceFolder}",
            "stopAtEntry": false,
            "console": "internalConsole",
            "name": ".NET Core Attach",
            "type": "coreclr",
            "request": "attach",


when trying to debug im getting this in vscode terminal:

 *  Executing task: dotnet build /property:GenerateFullPaths=true /consoleloggerparameters:NoSummary 

bash: dotnet: command not found

 *  The terminal process "C:\msys64\usr\bin\bash.exe '--login', '-i', '-c', 'dotnet build /property:GenerateFullPaths=true /consoleloggerparameters:NoSummary'" terminated with exit code: 127. 
 *  Terminal will be reused by tasks, press any key to close it.

Somehow it run the dotnet app in the mysys64 bash shell which i guess is the problem , but how to fix it ?