@@ -150,26 +150,7 @@ def init_connection(self):
150150 if idekey != '' and init_message ['idekey' ] != idekey :
151151 return False
152152
153- max_depth = int (get_setting ('debugger/max_depth' ))
154- command = 'feature_set -i %d -n max_depth -v %d' % (
155- self .__get_transaction_id (),
156- max_depth
157- )
158- response = self .__send_command (command )
159-
160- max_children = int (get_setting ('debugger/max_children' ))
161- command = 'feature_set -i %d -n max_children -v %d' % (
162- self .__get_transaction_id (),
163- max_children
164- )
165- response = self .__send_command (command )
166-
167- max_data = int (get_setting ('debugger/max_data' ))
168- command = 'feature_set -i %d -n max_data -v %d' % (
169- self .__get_transaction_id (),
170- max_data
171- )
172- response = self .__send_command (command )
153+ self .__set_debugger_features ()
173154
174155 self .init_message = init_message
175156
@@ -228,6 +209,8 @@ def run(self):
228209 (index , expression ) = data
229210 response = self .__evaluate_expression (expression )
230211 self .expression_evaluated_signal .emit (index , response )
212+ elif action == 'set_debugger_features' :
213+ self .__set_debugger_features ()
231214 except OSError as error :
232215 self .disconnect ()
233216 self .connection_error_signal .emit (action , error .strerror )
@@ -291,6 +274,10 @@ def evaluate_expression(self, index, expression):
291274 self .data = (index , expression )
292275 self .start ()
293276
277+ def set_debugger_features (self ):
278+ self .action = 'set_debugger_features'
279+ self .start ()
280+
294281 def __post_start (self , data ):
295282 post_start_response = {
296283 'init_breakpoints' : self .__set_init_breakpoints (
@@ -429,6 +416,30 @@ def __evaluate_expression(self, expression):
429416
430417 return self .parser .parse_eval_message (response )
431418
419+ def __set_debugger_features (self ):
420+ max_depth = int (get_setting ('debugger/max_depth' ))
421+ command = 'feature_set -i %d -n max_depth -v %d' % (
422+ self .__get_transaction_id (),
423+ max_depth
424+ )
425+ response = self .__send_command (command )
426+
427+ max_children = int (get_setting ('debugger/max_children' ))
428+ command = 'feature_set -i %d -n max_children -v %d' % (
429+ self .__get_transaction_id (),
430+ max_children
431+ )
432+ response = self .__send_command (command )
433+
434+ max_data = int (get_setting ('debugger/max_data' ))
435+ command = 'feature_set -i %d -n max_data -v %d' % (
436+ self .__get_transaction_id (),
437+ max_data
438+ )
439+ response = self .__send_command (command )
440+
441+ return True
442+
432443 def __send_command (self , command ):
433444 self .socket .send (bytes (command + '\0 ' , 'utf-8' ))
434445 return self .__receive_message ()
0 commit comments