microsoft / vscode-debugadapter-node

Debug adapter protocol and implementation for VS Code.
Other
273 stars 79 forks source link

add ExceptionOptions; fixes #64 #88

Closed weinand closed 8 years ago

weinand commented 8 years ago

A proposal based on the 'glob pattern' approach.

gregg-miskelly commented 8 years ago

To give an example to make sure I understand, if I wanted to break on all .NET exceptions user-unhanded, exception for System.InvalidOperationException which I want to always break on, I would get something like this?

{
  "exceptionOptions": [
    {
      "path": [
        {
          "names": [ ".NET Exceptions" ]
        }
      ],
      "breakMode": "userUnhandled"
    },
    {
      "path": [
        {
          "names": [ ".NET Exceptions", "System.InvalidOperationException" ]
        }
      ],
      "breakMode": "always"
    }
  ]
}
weinand commented 8 years ago

@gregg-miskelly the "names" array in your example is an alternation. So it would mean "always break on all exception under '.NET Exceptions' and 'System.InvalidOperationException'".

What you want is:

{
  "exceptionOptions": [
    {
      "path": [
        {
          "names": [ ".NET Exceptions" ]
        }
      ],
      "breakMode": "userUnhandled"
    },
    {
      "path": [
        {
          "names": [ ".NET Exceptions" ]
        },
        {
          "names": [ "System.InvalidOperationException" ]
        }
      ],
      "breakMode": "always"
    }
  ]
}