Debug Pylons application through Eclipse

后端 未结 7 1966
[愿得一人]
[愿得一人] 2020-12-24 09:22

I have Eclipse setup with PyDev and love being able to debug my scripts/apps. I\'ve just started playing around with Pylons and was wondering if there is a way to start up

7条回答
  •  借酒劲吻你
    2020-12-24 10:05

    If you'd rather not include your Python installation in your project's workspace to get paster, you can create a pure-Python driver like:

    #!/usr/bin/env python
    
    from paste.script.serve import ServeCommand
    
    ServeCommand("serve").run(["development.ini"])
    

    ...and run/debug that in Eclipse.

    Note: this is running without the --reload option, so you don't get hot deploys (i.e., you'll need to reload server to see changes). Alternatively, you can add the --reload option to get hot deploys, but then Pydev won't stop at your breakpoints. Can't have your cake and eat it too...

    ServeCommand("serve").run(["--reload", "development.ini"])
    

提交回复
热议问题