Repository: microsoft/ptvsd

Issue:
Update SetDebuggerProperty arguments in debugProtocolCustom.json
We should change debugProtocolCustom.json and update the protocol-related classes for the `setDebuggerProperty` arguments -- we should be accessing by attributes in the arguments in `on_setdebuggerproperty_request` (checking for None if it's optional) instead of checking kwargs in the arguments (and change those properties to camelCase).


Discussion:

Resolving patch:
diff --git a/src/ptvsd/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema.py b/src/ptvsd/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema.py
--- a/src/ptvsd/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema.py
+++ b/src/ptvsd/_vendored/pydevd/_pydevd_bundle/_debug_adapter/pydevd_schema.py
@@ -11739,22 +11739,87 @@ class SetDebuggerPropertyArguments(BaseSchema):
     Note: automatically generated code. Do not edit manually.
     """
 
-    __props__ = {}
+    __props__ = {
+        "ideOS": {
+            "type": [
+                "string"
+            ],
+            "description": "OS where the ide is running. Supported values [Windows, Linux]"
+        },
+        "dontTraceStartPatterns": {
+            "type": [
+                "array"
+            ],
+            "description": "Patterns to match with the start of the file paths. Matching paths will be added to a list of file where trace is ignored."
+        },
+        "dontTraceEndPatterns": {
+            "type": [
+                "array"
+            ],
+            "description": "Patterns to match with the end of the file paths. Matching paths will be added to a list of file where trace is ignored."
+        },
+        "skipSuspendOnBreakpointException": {
+            "type": [
+                "array"
+            ],
+            "description": "List of exceptions that should be skipped when doing condition evaluations."
+        },
+        "skipPrintBreakpointException": {
+            "type": [
+                "array"
+            ],
+            "description": "List of exceptions that should skip printing to stderr when doing condition evaluations."
+        },
+        "multiThreadsSingleNotification": {
+            "type": [
+                "boolean"
+            ],
+            "description": "If false then a notification is generated for each thread event. If true a single event is gnenerated, and all threads follow that behavior."
+        }
+    }
     __refs__ = set()
 
     __slots__ = list(__props__.keys()) + ['kwargs']
 
-    def __init__(self, update_ids_from_dap=False, **kwargs):  # noqa (update_ids_from_dap may be unused)
+    def __init__(self, ideOS=None, dontTraceStartPatterns=None, dontTraceEndPatterns=None, skipSuspendOnBreakpointException=None, skipPrintBreakpointException=None, multiThreadsSingleNotification=None, update_ids_from_dap=False, **kwargs):  # noqa (update_ids_from_dap may be unused)
         """
-    
+        :param ['string'] ideOS: OS where the ide is running. Supported values [Windows, Linux]
+        :param ['array'] dontTraceStartPatterns: Patterns to match with the start of the file paths. Matching paths will be added to a list of file where trace is ignored.
+        :param ['array'] dontTraceEndPatterns: Patterns to match with the end of the file paths. Matching paths will be added to a list of file where trace is ignored.
+        :param ['array'] skipSuspendOnBreakpointException: List of exceptions that should be skipped when doing condition evaluations.
+        :param ['array'] skipPrintBreakpointException: List of exceptions that should skip printing to stderr when doing condition evaluations.
+        :param ['boolean'] multiThreadsSingleNotification: If false then a notification is generated for each thread event. If true a single event is gnenerated, and all threads follow that behavior.
         """
-    
+        self.ideOS = ideOS
+        self.dontTraceStartPatterns = dontTraceStartPatterns
+        self.dontTraceEndPatterns = dontTraceEndPatterns
+        self.skipSuspendOnBreakpointException = skipSuspendOnBreakpointException
+        self.skipPrintBreakpointException = skipPrintBreakpointException
+        self.multiThreadsSingleNotification = multiThreadsSingleNotification
         self.kwargs = kwargs
 
 
     def to_dict(self, update_ids_to_dap=False):  # noqa (update_ids_to_dap may be unused)
+        ideOS = self.ideOS
+        dontTraceStartPatterns = self.dontTraceStartPatterns
+        dontTraceEndPatterns = self.dontTraceEndPatterns
+        skipSuspendOnBreakpointException = self.skipSuspendOnBreakpointException
+        skipPrintBreakpointException = self.skipPrintBreakpointException
+        multiThreadsSingleNotification = self.multiThreadsSingleNotification
         dct = {
         }
+        if ideOS is not None:
+            dct['ideOS'] = ideOS
+        if dontTraceStartPatterns is not None:
+            dct['dontTraceStartPatterns'] = dontTraceStartPatterns
+        if dontTraceEndPatterns is not None:
+            dct['dontTraceEndPatterns'] = dontTraceEndPatterns
+        if skipSuspendOnBreakpointException is not None:
+            dct['skipSuspendOnBreakpointException'] = skipSuspendOnBreakpointException
+        if skipPrintBreakpointException is not None:
+            dct['skipPrintBreakpointException'] = skipPrintBreakpointException
+        if multiThreadsSingleNotification is not None:
+            dct['multiThreadsSingleNotification'] = multiThreadsSingleNotification
         dct.update(self.kwargs)
         return dct
 
diff --git a/src/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py b/src/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py
--- a/src/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py
+++ b/src/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_process_net_command_json.py
@@ -833,25 +833,25 @@ def on_goto_request(self, py_db, request):
         return None
 
     def on_setdebuggerproperty_request(self, py_db, request):
-        args = request.arguments.kwargs
-        if 'ideOS' in args:
-            self.api.set_ide_os(args['ideOS'])
+        args = request.arguments
+        if args.ideOS is not None:
+            self.api.set_ide_os(args.ideOS)
 
-        if 'dontTraceStartPatterns' in args and 'dontTraceEndPatterns' in args:
-            start_patterns = tuple(args['dontTraceStartPatterns'])
-            end_patterns = tuple(args['dontTraceEndPatterns'])
+        if args.dontTraceStartPatterns is not None and args.dontTraceEndPatterns is not None:
+            start_patterns = tuple(args.dontTraceStartPatterns)
+            end_patterns = tuple(args.dontTraceEndPatterns)
             self.api.set_dont_trace_start_end_patterns(py_db, start_patterns, end_patterns)
 
-        if 'skipSuspendOnBreakpointException' in args:
+        if args.skipSuspendOnBreakpointException is not None:
             py_db.skip_suspend_on_breakpoint_exception = tuple(
-                get_exception_class(x) for x in args['skipSuspendOnBreakpointException'])
+                get_exception_class(x) for x in args.skipSuspendOnBreakpointException)
 
-        if 'skipPrintBreakpointException' in args:
+        if args.skipPrintBreakpointException is not None:
             py_db.skip_print_breakpoint_exception = tuple(
-                get_exception_class(x) for x in args['skipPrintBreakpointException'])
+                get_exception_class(x) for x in args.skipPrintBreakpointException)
 
-        if 'multiThreadsSingleNotification' in args:
-            py_db.multi_threads_single_notification = args['multiThreadsSingleNotification']
+        if args.multiThreadsSingleNotification is not None:
+            py_db.multi_threads_single_notification = args.multiThreadsSingleNotification
 
         # TODO: Support other common settings. Note that not all of these might be relevant to python.
         # JustMyCodeStepping: 0 or 1


Test patch: