Skip to content

Instantly share code, notes, and snippets.

@raghur
Last active May 15, 2021 07:23
Show Gist options
  • Save raghur/85bcad85404787ec3ae81ff9db6a36d8 to your computer and use it in GitHub Desktop.
Save raghur/85bcad85404787ec3ae81ff9db6a36d8 to your computer and use it in GitHub Desktop.
Debug F# tests in VSCode
  1. Install .net core test explorer

  2. In the test to debug, add a breakpoint

  3. In the test explorer window, select the test and right click 'Debug'

  4. have a launch config to attach like so:

            {
                "name": "attach",
                "type": "coreclr",
                "request": "attach",
                "presentation": {
                    "hidden": false,
                    "group": "Tests",
                    "order": 1
                },
                "processId": "${command:pickProcess}"
            },
  5. Launch, in the process picker, search for testhost and atttach

  6. Hit f5 (Continue) if needed - eventually the debugger should stop on the line.

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