Skip to content
This repository was archived by the owner on Aug 28, 2020. It is now read-only.

Commit dc2c081

Browse files
committed
get debugger features from settings
1 parent 9a8d453 commit dc2c081

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

pugdebug/server.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,18 +148,24 @@ def init_connection(self):
148148
if idekey != '' and init_message['idekey'] != idekey:
149149
return False
150150

151-
command = 'feature_set -i %d -n max_depth -v 9' % (
152-
self.__get_transaction_id()
151+
max_depth = int(get_setting('debugger/max_depth'))
152+
command = 'feature_set -i %d -n max_depth -v %d' % (
153+
self.__get_transaction_id(),
154+
max_depth
153155
)
154156
response = self.__send_command(command)
155157

156-
command = 'feature_set -i %d -n max_children -v 512' % (
157-
self.__get_transaction_id()
158+
max_children = int(get_setting('debugger/max_children'))
159+
command = 'feature_set -i %d -n max_children -v %d' % (
160+
self.__get_transaction_id(),
161+
max_children
158162
)
159163
response = self.__send_command(command)
160164

161-
command = 'feature_set -i %d -n max_data -v 4096' % (
162-
self.__get_transaction_id()
165+
max_data = int(get_setting('debugger/max_data'))
166+
command = 'feature_set -i %d -n max_data -v %d' % (
167+
self.__get_transaction_id(),
168+
max_data
163169
)
164170
response = self.__send_command(command)
165171

0 commit comments

Comments
 (0)