Closed AlexGuo1998 closed 3 years ago
I just tried it here and it seems to work properly for me in pydevd
... are you using the PyCharm
version by any chance? --they have their own fork which may not be up-to-date here...
i.e.: the output I get is:
pydev debugger: starting (pid: 25708)
argv is: ['W:\\pydev.debugger\\check\\snippet7.py']
spawn new process
pydev debugger: starting (pid: 22028)
argv is: ['W:\\pydev.debugger\\check\\snippet7.py', 'a"b"c']
new process finished
Oh thanks for pointing out that. Actually I'm using PyCharm bundled pydevd
. I'll redirect this issue to their tracker.
patch_arg_str_win
will incorrectly strip quotation marks"
on Windows.To reproduce, try this code on Windows (
popen.py
):Result with
python popen.py
, no debugger:Result with debugger attached:
Notice that
'a"b"c'
vs'abc'
.This should be a bug in
patch_arg_str_win
:https://github.com/fabioz/PyDev.Debugger/blob/bdec6121831a0799059d8e85705b4dab0e2ae882/_pydev_bundle/pydev_monkey.py#L658-L665
Printing original and patched
arg_str
indicates\
is incorrectly stripped.