Skip to content

Commit a7da015

Browse files
committed
use double quote around property in property_get
Some debuggers don't like you just sending obj['subobj']. The possible response you get there is that the property is not found. Refering to the dbgp documentation we an also send the property_get command with the property between double qoutes, but that implicates we must escape backslashes and double quotes. Fixes #312 Signed-off-by: BlackEagle <[email protected]>
1 parent 744b4bd commit a7da015

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pythonx/vdebug/dbgp.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,11 @@ def context_names(self):
360360
def property_get(self, name):
361361
"""Get a property.
362362
"""
363-
return self.send_cmd('property_get', '-n %s -d 0' % name,
364-
ContextGetResponse)
363+
return self.send_cmd(
364+
'property_get',
365+
'-n "%s" -d 0' % name.replace("\\", "\\\\").replace("\"", "\\\""),
366+
ContextGetResponse
367+
)
365368

366369
def detach(self):
367370
"""Tell the debugger to detach itself from this

0 commit comments

Comments
 (0)