PyDev doesn't remember run mode

pdarrow
2008-04-11
2013-03-15
  • pdarrow

    pdarrow - 2008-04-11

    Hi,

    When I run a module I have open in an editor (Ctrl+F11), it brings up the 'Run As' dialog. This is expected on first run, so I select 'Python Run' for instance. But when I go to run the same module again immediately after, it brings up the 'Run As' dialog again. Shouldn't PyDev act like the Eclipse Java editor and remember the last run configuration? I'm not sure if this is a bug or if this is expected behaviour.

    A workaround to this is to enable "Always launch the previously launched application" under Preferences > Run/Debug > Launching but is quite annoying; when switching between modules in the editor, PyDev will not launch the active editor. Any ideas? I'm using Eclipse 3.3.2 and PyDev 1.3.14.

    Peter

     
    • Fabio Zadrozny

      Fabio Zadrozny - 2008-04-11

      Pydev can launch the current editor with F9 (python) or Ctrl+F9 (jython)... So, leave the "Always launch the previously launched application" enabled and use those shortcuts to launch the current editor.

      Cheers,

      Fabio

       
    • Steffen Siebert

      Steffen Siebert - 2008-04-29

      F9 works, but is there also a key available to run as python unit-test?

      Ciao,
        Steffen

       
      • Fabio Zadrozny

        Fabio Zadrozny - 2008-04-29

        Not really... usually what I do is that the test module has as its main:

        #===================================================================================================
        # main
        #===================================================================================================
        if __name__ == '__main__':
        ....#import sys;sys.argv = ['', 'Test.testXXX']
        ....unittest.main()

        That way I can run it as a regular run and it'll run the tests, and it also helps in choosing a single test to run when uncommenting the line that changes argv... (I put that in my default template for tests).

        Cheers,

        Fabio

         

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks