"Execute Line in Console" doesn't work when debugging script )
Select correct tool window and enable multiline commands in debug console
@@ -460,6 +460,7 @@ def console_exec(thread_id, frame_id, expression, dbg):
"""
frame = pydevd_vars.find_frame(thread_id, frame_id)
+ is_multiline = expression.count('@LINE@') > 1
expression = str(expression.replace('@LINE@', '\n'))
#Not using frame.f_globals because of https://sourceforge.net/tracker2/?func=detail&aid=2541355&group_id=85796&atid=577329
@@ -478,16 +479,18 @@ def console_exec(thread_id, frame_id, expression, dbg):
interpreter = ConsoleWriter()
+ if not is_multiline:
try:
code = compile_command(expression)
except (OverflowError, SyntaxError, ValueError):
# Case 1
interpreter.showsyntaxerror()
return False
-
if code is None:
# Case 2
return True
+ else:
+ code = expression
#Case 3
