def debug_sync(self, conn_id, cmd_name, cmd_args, progress_callback):
        """Asynchronously complete a named debug command.

        The command name and arguments are passed to the underlying device adapter
        and interpreted there.  If the command is long running, progress_callback
        may be used to provide status updates.  Callback is called when the command
        has finished.

        Args:
            conn_id (int): A unique identifier that will refer to this connection
            cmd_name (string): the name of the debug command we want to invoke
            cmd_args (dict): any arguments that we want to send with this command.
            progress_callback (callable): A function to be called with status on our progress, called as:
                progress_callback(done_count, total_count)
        """

        done = threading.Event()
        result = {}

        def _debug_done(conn_id, adapter_id, success, retval, reason):
            result['success'] = success
            result['failure_reason'] = reason
            result['return_value'] = retval

            done.set()

        self.debug_async(conn_id, cmd_name, cmd_args, progress_callback, _debug_done)
        done.wait()

        return result