def _set_debug_options(self, py_db, args): rules = args.get('rules') exclude_filters = [] if rules is not None: exclude_filters = _convert_rules_to_exclude_filters( rules, self.api.filename_to_server, lambda msg:self.api.send_error_message(py_db, msg)) self.api.set_exclude_filters(py_db, exclude_filters) self._debug_options = _extract_debug_options( args.get('options'), args.get('debugOptions'), ) self._debug_options['args'] = args debug_stdlib = self._debug_options.get('DEBUG_STDLIB', False) self.api.set_use_libraries_filter(py_db, not debug_stdlib) path_mappings = [] for pathMapping in args.get('pathMappings', []): localRoot = pathMapping.get('localRoot', '') remoteRoot = pathMapping.get('remoteRoot', '') remoteRoot = self._resolve_remote_root(localRoot, remoteRoot) if (localRoot != '') and (remoteRoot != ''): path_mappings.append((localRoot, remoteRoot)) if bool(path_mappings): pydevd_file_utils.setup_client_server_paths(path_mappings)
def _set_debug_options(self, py_db, args, start_reason): rules = args.get('rules') stepping_resumes_all_threads = args.get('steppingResumesAllThreads', True) self.api.set_stepping_resumes_all_threads( py_db, stepping_resumes_all_threads) terminate_child_processes = args.get('terminateChildProcesses', True) self.api.set_terminate_child_processes(py_db, terminate_child_processes) exclude_filters = [] if rules is not None: exclude_filters = _convert_rules_to_exclude_filters( rules, self.api.filename_to_server, lambda msg: self.api.send_error_message(py_db, msg)) self.api.set_exclude_filters(py_db, exclude_filters) self._debug_options = _extract_debug_options( args.get('options'), args.get('debugOptions'), ) self._debug_options['args'] = args debug_stdlib = self._debug_options.get('DEBUG_STDLIB', False) self.api.set_use_libraries_filter(py_db, not debug_stdlib) path_mappings = [] for pathMapping in args.get('pathMappings', []): localRoot = pathMapping.get('localRoot', '') remoteRoot = pathMapping.get('remoteRoot', '') remoteRoot = self._resolve_remote_root(localRoot, remoteRoot) if (localRoot != '') and (remoteRoot != ''): path_mappings.append((localRoot, remoteRoot)) if bool(path_mappings): pydevd_file_utils.setup_client_server_paths(path_mappings) if self._debug_options.get('REDIRECT_OUTPUT', False): py_db.enable_output_redirection(True, True) else: py_db.enable_output_redirection(False, False) self.api.set_show_return_values( py_db, self._debug_options.get('SHOW_RETURN_VALUE', False)) if not self._debug_options.get('BREAK_SYSTEMEXIT_ZERO', False): ignore_system_exit_codes = [0] if self._debug_options.get('DJANGO_DEBUG', False): ignore_system_exit_codes += [3] self.api.set_ignore_system_exit_codes(py_db, ignore_system_exit_codes) if self._debug_options.get('STOP_ON_ENTRY', False) and start_reason == 'launch': self.api.stop_on_entry()
def _set_debug_options(self, py_db, args, start_reason): rules = args.get('rules') stepping_resumes_all_threads = args.get('steppingResumesAllThreads', True) self.api.set_stepping_resumes_all_threads( py_db, stepping_resumes_all_threads) terminate_child_processes = args.get('terminateChildProcesses', True) self.api.set_terminate_child_processes(py_db, terminate_child_processes) exclude_filters = [] if rules is not None: exclude_filters = _convert_rules_to_exclude_filters( rules, self.api.filename_to_server, lambda msg: self.api.send_error_message(py_db, msg)) self.api.set_exclude_filters(py_db, exclude_filters) debug_options = _extract_debug_options( args.get('options'), args.get('debugOptions'), ) self._options.update_fom_debug_options(debug_options) self._options.update_from_args(args) self.api.set_use_libraries_filter(py_db, not self._options.debug_stdlib) path_mappings = [] for pathMapping in args.get('pathMappings', []): localRoot = pathMapping.get('localRoot', '') remoteRoot = pathMapping.get('remoteRoot', '') remoteRoot = self._resolve_remote_root(localRoot, remoteRoot) if (localRoot != '') and (remoteRoot != ''): path_mappings.append((localRoot, remoteRoot)) if bool(path_mappings): pydevd_file_utils.setup_client_server_paths(path_mappings) if self._options.redirect_output: py_db.enable_output_redirection(True, True) else: py_db.enable_output_redirection(False, False) self.api.set_show_return_values(py_db, self._options.show_return_value) if not self._options.break_system_exit_zero: ignore_system_exit_codes = [0] if self._options.django_debug: ignore_system_exit_codes += [3] self.api.set_ignore_system_exit_codes(py_db, ignore_system_exit_codes) if self._options.stop_on_entry and start_reason == 'launch': self.api.stop_on_entry()
def _set_debug_options(self, py_db, args): rules = args.get('rules') exclude_filters = [] if rules is not None: exclude_filters = _convert_rules_to_exclude_filters( rules, self.api.filename_to_server, lambda msg:self.api.send_error_message(py_db, msg)) self.api.set_exclude_filters(py_db, exclude_filters) self._debug_options = _extract_debug_options( args.get('options'), args.get('debugOptions'), ) debug_stdlib = self._debug_options.get('DEBUG_STDLIB', False) self.api.set_use_libraries_filter(py_db, not debug_stdlib)
def _set_debug_options(self, py_db, args): rules = args.get('rules') exclude_filters = [] if rules is not None: exclude_filters = _convert_rules_to_exclude_filters( rules, self.api.filename_to_server, lambda msg:self.api.send_error_message(py_db, msg)) self.api.set_exclude_filters(py_db, exclude_filters) self._debug_options = _extract_debug_options( args.get('options'), args.get('debugOptions'), ) self._debug_options['args'] = args debug_stdlib = self._debug_options.get('DEBUG_STDLIB', False) self.api.set_use_libraries_filter(py_db, not debug_stdlib)
def _set_debug_options(self, py_db, args, start_reason): rules = args.get('rules') exclude_filters = [] if rules is not None: exclude_filters = _convert_rules_to_exclude_filters( rules, self.api.filename_to_server, lambda msg: self.api.send_error_message(py_db, msg)) self.api.set_exclude_filters(py_db, exclude_filters) self._debug_options = _extract_debug_options( args.get('options'), args.get('debugOptions'), ) self._debug_options['args'] = args debug_stdlib = self._debug_options.get('DEBUG_STDLIB', False) self.api.set_use_libraries_filter(py_db, not debug_stdlib) path_mappings = [] for pathMapping in args.get('pathMappings', []): localRoot = pathMapping.get('localRoot', '') remoteRoot = pathMapping.get('remoteRoot', '') remoteRoot = self._resolve_remote_root(localRoot, remoteRoot) if (localRoot != '') and (remoteRoot != ''): path_mappings.append((localRoot, remoteRoot)) if bool(path_mappings): pydevd_file_utils.setup_client_server_paths(path_mappings) if self._debug_options.get('REDIRECT_OUTPUT', False): py_db.enable_output_redirection(True, True) else: py_db.enable_output_redirection(False, False) self.api.set_show_return_values( py_db, self._debug_options.get('SHOW_RETURN_VALUE', False)) if self._debug_options.get('STOP_ON_ENTRY', False) and start_reason == 'launch': self.api.stop_on_entry()
def _set_debug_options(self, py_db, args, start_reason): rules = args.get('rules') exclude_filters = [] if rules is not None: exclude_filters = _convert_rules_to_exclude_filters( rules, self.api.filename_to_server, lambda msg: self.api.send_error_message(py_db, msg)) self.api.set_exclude_filters(py_db, exclude_filters) self._debug_options = _extract_debug_options( args.get('options'), args.get('debugOptions'), ) self._debug_options['args'] = args debug_stdlib = self._debug_options.get('DEBUG_STDLIB', False) self.api.set_use_libraries_filter(py_db, not debug_stdlib) path_mappings = [] for pathMapping in args.get('pathMappings', []): localRoot = pathMapping.get('localRoot', '') remoteRoot = pathMapping.get('remoteRoot', '') remoteRoot = self._resolve_remote_root(localRoot, remoteRoot) if (localRoot != '') and (remoteRoot != ''): path_mappings.append((localRoot, remoteRoot)) if bool(path_mappings): pydevd_file_utils.setup_client_server_paths(path_mappings) if self._debug_options.get('REDIRECT_OUTPUT', False): py_db.enable_output_redirection(True, True) else: py_db.enable_output_redirection(False, False) self.api.set_show_return_values(py_db, self._debug_options.get('SHOW_RETURN_VALUE', False)) if self._debug_options.get('STOP_ON_ENTRY', False) and start_reason == 'launch': self.api.stop_on_entry()
def _set_debug_options(self, args): self.debug_options = _extract_debug_options( args.get('options'), args.get('debugOptions'), )
def _set_debug_options(self, py_db, args, start_reason): rules = args.get('rules') stepping_resumes_all_threads = args.get('steppingResumesAllThreads', True) self.api.set_stepping_resumes_all_threads(py_db, stepping_resumes_all_threads) terminate_child_processes = args.get('terminateChildProcesses', True) self.api.set_terminate_child_processes(py_db, terminate_child_processes) variable_presentation = args.get('variablePresentation', None) if isinstance(variable_presentation, dict): def get_variable_presentation(setting, default): value = variable_presentation.get(setting, default) if value not in ('group', 'inline', 'hide'): pydev_log.info( 'The value set for "%s" (%s) in the variablePresentation is not valid. Valid values are: "group", "inline", "hide"' % ( setting, value,)) value = default return value default = get_variable_presentation('all', 'group') special_presentation = get_variable_presentation('special', default) function_presentation = get_variable_presentation('function', default) class_presentation = get_variable_presentation('class', default) protected_presentation = get_variable_presentation('protected', default) self.api.set_variable_presentation(py_db, self.api.VariablePresentation( special_presentation, function_presentation, class_presentation, protected_presentation )) exclude_filters = [] if rules is not None: exclude_filters = _convert_rules_to_exclude_filters( rules, self.api.filename_to_server, lambda msg: self.api.send_error_message(py_db, msg)) self.api.set_exclude_filters(py_db, exclude_filters) debug_options = _extract_debug_options( args.get('options'), args.get('debugOptions'), ) self._options.update_fom_debug_options(debug_options) self._options.update_from_args(args) self.api.set_use_libraries_filter(py_db, self._options.just_my_code) path_mappings = [] for pathMapping in args.get('pathMappings', []): localRoot = pathMapping.get('localRoot', '') remoteRoot = pathMapping.get('remoteRoot', '') remoteRoot = self._resolve_remote_root(localRoot, remoteRoot) if (localRoot != '') and (remoteRoot != ''): path_mappings.append((localRoot, remoteRoot)) if bool(path_mappings): pydevd_file_utils.setup_client_server_paths(path_mappings) if self._options.redirect_output: py_db.enable_output_redirection(True, True) else: py_db.enable_output_redirection(False, False) self.api.set_show_return_values(py_db, self._options.show_return_value) if not self._options.break_system_exit_zero: ignore_system_exit_codes = [0] if self._options.django_debug: ignore_system_exit_codes += [3] self.api.set_ignore_system_exit_codes(py_db, ignore_system_exit_codes) if self._options.stop_on_entry and start_reason == 'launch': self.api.stop_on_entry()