Debugging pylons in Eclipse under Ubuntu

I am trying to get pylons to debug in Eclipse under Ubuntu. Specifically. I am not sure what to use for the 'Main Module' on the Run configurations dialog.

(this is a similar question on stackoverflow, but I think it applies to windows as I can't find paster-script.py on my system)

Can anyone help?


Asked by: Tara506 | Posted: 05-10-2021






Answer 1

I've managed to fix this now.

In Window>Preferences>Pydev>Interpreter-Python remove the python interpreter and reload it (select New) after installing pylons.

In the Terminal cd into the projects directory. Then type sudo python setup.py develop Not sure what this does, but it does the trick (if any one wants to fill me in, please do)

In Run>Open Debug Dialog enter the location of paster in Main Module. For me this is /usr/bin/paster . Then in the Arguments tab in Program arguments enter serve /locationOfYourProject/development.ini

All set to go. It took a lot of search for me to find out that it does not work if the arguments includes --reload

Answered by: Rubie694 | Posted: 06-11-2021



Answer 2

I got it running basically almost the same way - although you do not have to do the setup.py develop step - it works fine without that.

What it does is that is sets global link to your project directory for a python package named after your project name.

Answered by: Brooke380 | Posted: 06-11-2021



Answer 3

I do need this step "sudo python setup.py develop" to get it running.. otherwise it throw out some exceptions.

btw, the setup.py is the one in your created project.

Answered by: Carlos711 | Posted: 06-11-2021



Answer 4

Haven't tried on Eclipse, but I bet the solution I have been using to debug Pylons apps in WingIDE will work here too.

  1. Write the following two-liner (name it run_me.py or similarly) and save it in your project directory:

    from paste.script.serve import ServeCommand

    ServeCommand("serve").run(["development.ini"])

  2. Set this file as main debug target (aka main module)

  3. Enjoy.

Answered by: Leonardo345 | Posted: 06-11-2021



Similar questions

python - Debugging in Eclipse pydev

I am debugging this code in Eclipse the code below. import wx class MyFrame(wx.Frame): def __init__(self, parent, title): wx.Frame.__init__(self, parent, title=title, size=(200,100)) self.Show() bar = 'tt' car = 'aa' self.ss = 5 bttn = wx.Button(self, -1, pos=(30,10), size=(120,30)) bttn.Bind(wx.EVT_BUTTON, self.pr) But the pr...


python - Can't get PyDev remote debugging to work with Eclipse

Everytime I start up Debug Server and try to add a breakpoint in my code, I get: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pydev/pydevd.py", line 711, in processNetCommand breakpoint_id = int(breakpoint_id) ValueError: invalid literal for int() with base 10: 'C:\\Users\blah\blah\\blah\\blah\\blah\\debugger.py' I'm using PyDev Remote Debu...


Eclipse Python debugging

I need your help. I'm currently help two graduate students begin their first footsteps into programming, and I've suggested Python. One went straight for Eclipse, since she had seen me using it, and we decided just to catch the other student up with the same setup. Here's the issue. Both downloaded Eclipse Luna, both used Eclipse's option to download new data for installing pydev from


python - How to setup remote debugging with Eclipse and PyDev

I have been working with a Python program in an Ubuntu 14.04 machine, however, I would like to be able to debug that Python program using Eclipse with the PyDev plugin, but since my Ubuntu machine doesn't have a UI I would like to be able to use my Windows machine, install Eclipse + PyDev on it, and use it to remotely debug the Python program from the Linux machine. Does anybody know how to set that up? I've seen there is ...


python - why doesn't debugging with eclipse work?

I am using eclipse - Neon Release (4.6.0) and python 2.7. Every time I run the debugger I get the message below and I can't figure out what is the problem. What is missing here? 'Launcing start_debugger.py' has encountered a problem. Varaible refernces nin-existent resource: ${workspace_loc:automation/debugger_test.py}


python - Debugging in Eclipse pydev

I am debugging this code in Eclipse the code below. import wx class MyFrame(wx.Frame): def __init__(self, parent, title): wx.Frame.__init__(self, parent, title=title, size=(200,100)) self.Show() bar = 'tt' car = 'aa' self.ss = 5 bttn = wx.Button(self, -1, pos=(30,10), size=(120,30)) bttn.Bind(wx.EVT_BUTTON, self.pr) But the pr...


python - Can't get PyDev remote debugging to work with Eclipse

Everytime I start up Debug Server and try to add a breakpoint in my code, I get: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pydev/pydevd.py", line 711, in processNetCommand breakpoint_id = int(breakpoint_id) ValueError: invalid literal for int() with base 10: 'C:\\Users\blah\blah\\blah\\blah\\blah\\debugger.py' I'm using PyDev Remote Debu...


eclipse - Is it possible to modify python code while debugging? with Pydev, PDB, etc

Let's say I am stepping through code with Eclipse's PyDev. Is there a way to add some new code below the breakpoint... modify the code on the fly / at runtime?


Eclipse Python debugging

I need your help. I'm currently help two graduate students begin their first footsteps into programming, and I've suggested Python. One went straight for Eclipse, since she had seen me using it, and we decided just to catch the other student up with the same setup. Here's the issue. Both downloaded Eclipse Luna, both used Eclipse's option to download new data for installing pydev from


python - How to setup remote debugging with Eclipse and PyDev

I have been working with a Python program in an Ubuntu 14.04 machine, however, I would like to be able to debug that Python program using Eclipse with the PyDev plugin, but since my Ubuntu machine doesn't have a UI I would like to be able to use my Windows machine, install Eclipse + PyDev on it, and use it to remotely debug the Python program from the Linux machine. Does anybody know how to set that up? I've seen there is ...


python - why doesn't debugging with eclipse work?

I am using eclipse - Neon Release (4.6.0) and python 2.7. Every time I run the debugger I get the message below and I can't figure out what is the problem. What is missing here? 'Launcing start_debugger.py' has encountered a problem. Varaible refernces nin-existent resource: ${workspace_loc:automation/debugger_test.py}


Remote debugging Python in Eclipse

I have Eclipse with Pydev and RSE installed on my local Windows machine. I want to remote debug a Python application (Odoo 9.0) that is hosted on an Ubuntu 16.04 VPS. I have Pydev installed on the remote machine. I have been able to connect to the remote machine via SSH using a key for authentication and I can browse the remote file system. Refering to the documentation here;


python - Django debugging with Emacs

I found a lot of info about how to debug simple Python programs with Emacs. But what if I want to debug a Django application? I run the development server and I would like to somehow attach to the process from Emacs and then set breakpoints, etc. Similar to Visual Studio's "attach to process". How to do that?


debugging - When to use the Python debugger

Since Python is a dynamic, interpreted language you don't have to compile your code before running it. Hence, it's very easy to simply write your code, run it, see what problems occur, and fix them. Using hotkeys or macros can make this incredibly quick. So, because it's so easy to immediately see the output of your program and any errors that may occur, I haven't uses a debugger tool yet. What situations may call ...


debugging - What are good ways to make my Python code run first time?

Closed. This question needs to be more focused. It ...


linux - Python memory debugging with GDB

We have a Linux application that makes use of OpenSSL's Python bindings and I suspect it is causing random crashes. Occasionally, we see it crash with the message: Python Fatal Error: GC Object already tracked which would appear to be either a programming error on the part of the library, or a symptom of memory corruption. Is there any way to know the last line of Python source...


Debugging a running python process

Is there a way to see a stacktrace of what various threads are doing inside a python process? Let's suppose I have a thread which allows me some sort of remote access to the process.


debugging - How do you pass script arguments to pdb (Python)?

I've got python script (ala #! /usr/bin/python) and I want to debug it with pdb. How can I pass arguments to the script? I have a python script and would like to debug it with pdb. Is there a way that I can pass arguments to the scripts?


debugging - Stop python from closing on error

In python when running scripts is there a way to stop the console window from closing after spitting out the traceback?


django - Python: Memory leak debugging

I have a small multithreaded script running in django and over time its starts using more and more memory. Leaving it for a full day eats about 6GB of RAM and I start to swap. Following http://www.lshift.net/blog/2008/11/14/tracing-python-memory-leaks I see this as the most common types (with only 800M of memory used):


debugging - Compiling python modules with DEBUG defined on MSVC

Python rather stupidly has a pragma directive in its include files that forces a link against python26_d.lib when the DEBUG preprocessor variable is defined. This is a problem because the python installer doesn't come with python26_d.lib! So I can't build applications in MSVC in debug mode. If I temporarily #undef DEBUG for just one file I get many complaints about incons...


debugging - Python code seems to be getting executed out of order

At work I have a programming language encoded in a database record. I'm trying to write a print function in python to display what the record contains. This is the code I'm having trouble with: # Un-indent the block if necessary. if func_option[row.FRML_FUNC_OPTN] in ['Endif', 'Else']: self.indent = self.indent - 1 # if this is a new line, indent it. if len(self.formulatext...






Still can't find your answer? Check out these communities...



PySlackers | Full Stack Python | NHS Python | Pythonist Cafe | Hacker Earth | Discord Python



top