0

Interactive mode in debugging fails as you try to use "imports" or just use "print 'hello world'". This seems to be a error that only exists until python 3.0 ?

Example code: ''' Created on 14. jun. 2016

'''
import time

Debugger output:
pydev debugger: starting (pid: 6988)
>>> time.sleep(4)
File "<stdin>", line 1
time.sleep(4)

             ^
SyntaxError: invalid syntax
>>> 

This error has been found on eclipse mars 2.2 with newest pydev from the repostory (5.0.0).

With the same eclipse 4.5.2 (Mars) and LiClipse with 5.0.0 or 4.5.5 Java 1.7.0.80 in windows the error persists. In Lubuntu with the LiClipse it works with out fail.

So the error seems to only occur in windows.

The invalid syntax is pointing to the end of the line in time.sleep(2).

JKN
  • 1
  • 1
  • The interactive mode is achived by -i in the Debug configuration - arguments - VM arguments – JKN Jun 17 '16 at 08:38

1 Answers1

1

Instead of using -i, you should use the actual interactive console: http://www.pydev.org/manual_adv_interactive_console.html.

I think you're having issues with \r\n there, which is why it works on Linux -- it's possible that changing preferences > general > workspace > new text file line delimiter will actually make it work so that it uses \n, but this mode of execution in PyDev is not really supported, if you want an interactive console you should use http://www.pydev.org/manual_adv_interactive_console.html.

Fabio Zadrozny
  • 24,814
  • 4
  • 66
  • 78