def debug_async(self, conn_id, cmd_name, cmd_args, progress_callback, 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 identifer 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)
            callback (callable): A callback for when we have finished the debug command, called as:
                callback(connection_id, adapter_id, success, retval, failure_reason)
                'connection_id': the connection id
                'adapter_id': this adapter's id
                'success': a bool indicating whether we received a response to our attempted RPC
                'failure_reason': a string with the reason for the failure if success == False
                'retval': A command specific dictionary of return value information
        """

        known_commands = {
            'dump_ram': JLinkControlThread.DUMP_ALL_RAM,
            'program_flash': JLinkControlThread.PROGRAM_FLASH,
        }

        cmd_code = known_commands.get(cmd_name)
        if cmd_code is None:
            callback(conn_id, self.id, False, None, "Unsupported command: %s" % cmd_name)

        def _on_finished(_name, retval, exception):
            if exception is not None:
                callback(conn_id, self.id, False, None, str(exception))
                return

            callback(conn_id, self.id, True, retval, None)

        self._control_thread.command(cmd_code, _on_finished, self._device_info, self._control_info, cmd_args, progress_callback)