From 8c395b2e2006f454f7e7ae72193e225504a50053 Mon Sep 17 00:00:00 2001 From: Elizaveta Shashkova Date: Thu, 10 Dec 2015 17:07:04 +0300 Subject: [PATCH] IndexError in pydev_monkey.py when debugging (PY-9767) We shouldn't attach to debugger if there are only options in a new python process command line --- python/helpers/pydev/pydev_monkey.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/helpers/pydev/pydev_monkey.py b/python/helpers/pydev/pydev_monkey.py index 191d01f47cd9..acf363844764 100644 --- a/python/helpers/pydev/pydev_monkey.py +++ b/python/helpers/pydev/pydev_monkey.py @@ -125,7 +125,7 @@ def patch_args(args): break i += 1 - if i < len(args) and _is_managed_arg(args[i]): # no need to add pydevd twice + if i >= len(args) or _is_managed_arg(args[i]): # no need to add pydevd twice return args for x in original: