Last active
July 4, 2020 13:45
-
-
Save joonty/3348076 to your computer and use it in GitHub Desktop.
Patch for client.py, part of the Komodo Python remote debugger. Fixes an exception being raised when "eval" is used, for versions 7.1.0 and 8.5.0.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3249,3250c3249 | |
< _eval_optlist = [['i','transaction_id', int, 1, -1, None], | |
< ['l','length', int, 1, 0, None]] | |
--- | |
> _eval_optlist = [['i','transaction_id', int, 1, -1, None]] | |
3252c3251 | |
< (tid, data_length, data,) = self._getopts(cmdargs, self._eval_optlist, "eval") | |
--- | |
> (tid, data,) = self._getopts(cmdargs, self._eval_optlist, "eval") | |
3268,3269c3267,3268 | |
< prop = Property(None, None, value, self._data_encoding, | |
< self._show_hidden, hiddenContextTypes[context_id]) | |
--- | |
> prop = Property(data, data, value, self._data_encoding, | |
> self._show_hidden, hiddenContextTypes[0]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3426,3427c3426 | |
< _eval_optlist = [['i','transaction_id', int, 1, -1, None], | |
< ['l','length', int, 1, 0, None]] | |
--- | |
> _eval_optlist = [['i','transaction_id', int, 1, -1, None]] | |
3429c3428 | |
< (tid, data_length, data,) = self._getopts(cmdargs, self._eval_optlist, | |
"eval") | |
--- | |
> (tid, data,) = self._getopts(cmdargs, self._eval_optlist, "eval") | |
3445,3446c3444,3445 | |
< prop = Property(None, None, value, self._data_encoding, | |
< self._show_hidden, hiddenContextTypes[context_id]) | |
--- | |
> prop = Property(data, data, value, self._data_encoding, | |
> self._show_hidden, hiddenContextTypes[0]) |
If you're happy to use Komodo-PythonRemoteDebugging-11.1.0-91033, this might work. Same edits as above, just different line numbers.
--- client.py 2020-06-21 14:32:45.269921276 +1000
+++ client.py.orig 2020-06-21 14:23:37.376844510 +1000
@@ -3433,10 +3433,10 @@
_template = '<response xmlns="urn:debugger_protocol_v1" command="breakpoint_list" transaction_id="%s">%s</response>'
self.socket.send_response(_template % (tid, bpinfo))
- _eval_optlist = [['i','transaction_id', int, 1, -1, None]]
-
+ _eval_optlist = [['i','transaction_id', int, 1, -1, None],
+ ['l','length', int, 1, 0, None]]
def do_eval(self, cmdargs, *args):
- (tid, data,) = self._getopts(cmdargs, self._eval_optlist, "eval")
+ (tid, data_length, data,) = self._getopts(cmdargs, self._eval_optlist, "eval")
# read data_length from the socket
if self._data_encoding == 'base64':
@@ -3452,8 +3452,8 @@
raise CommandError('eval', tid, ERROR_EVAL_FAILED,
'eval of expression failed: '+str(e))
- prop = Property(data, data, value, self._data_encoding,
- self._show_hidden, hiddenContextTypes[0])
+ prop = Property(None, None, value, self._data_encoding,
+ self._show_hidden, hiddenContextTypes[context_id])
_template = '<response xmlns="urn:debugger_protocol_v1" command="eval" transaction_id="%s">%s</response>'
I verified that client.py was patched (as shown in all above codes) but still I am getting the same error:
required argument [l:length] missing
-- any idea?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's what worked for me:
More or less worked. I still have issues with setting breakpoints in arbitrary scripts. It must have to do with
anisble
creating worker processes.