Skip to content

Instantly share code, notes, and snippets.

@salehjafarli
Last active October 3, 2022 09:06
Show Gist options
  • Select an option

  • Save salehjafarli/2b356bbf9ab5be7b14807dc66947ff02 to your computer and use it in GitHub Desktop.

Select an option

Save salehjafarli/2b356bbf9ab5be7b14807dc66947ff02 to your computer and use it in GitHub Desktop.

Debug .net framework 4.7.2 projects in visual studio code.

STEP 1: Open settings.json file in visual studio code and add this line below:

{
    "csharp.unitTestDebuggingOptions": {
      "type": "clr"
    }
}

STEP 2: Create .runsettings file and add this config:

<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
  <RunConfiguration>
    <TargetPlatform>x64</TargetPlatform>
  </RunConfiguration>
</RunSettings>

STEP 3: Open settings.json file again and add path of .runsettings file you created before like this:

{
    "omnisharp.testRunSettings": "C:\\Dev\\.runsettings" 
}

STEP 4: Open .csproj file of the project you want to debug, and add this line:

<DebugType>portable</DebugType>

After completing those steps, you will be able to debug .net framework 4.7.2 projects in vscode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment