After working with horrible php but the awesome xdebug+geben for emacs, I finally found an equivalent for python: winpdb and rpdb2.
In your code all you need is
import rpdb2; rpdb2.start_embedded_debugger('asdf',fAllowRemote=True)
where 'asdf' is just some password you come up with so that other users can't start debugging on your code.
Then start winpdb, navigate to file->attach, enter the password you chose, point it at your host and then debug away.
Great!
Showing posts with label debugging. Show all posts
Showing posts with label debugging. Show all posts
Wednesday, August 7, 2013
Thursday, October 20, 2011
Tuesday, October 11, 2011
Emacs, geben and xdebug
* sudo pecl install xdebug
* edit php.ini
* download geben: http://trac.sakura.ne.jp/geben/
* unpack it into ~/emacs.d/ (emacs includes folder) * add this to your .emacs file:
* open a php service with the parameter
`?XDEBUG_SESSION_START` to start debugging
source
* edit php.ini
zend_extension=/path/to/xdebug.so ; usually /usr/lib/php5/20060613+lfs/xdebug.so [debug] xdebug.remote_autostart=off xdebug.remote_enable=on xdebug.remote_handler=dbgp xdebug.remote_mode=req xdebug.remote_host=localhost xdebug.remote_port=9000* restart apache: /etc/init.d/apache2 restart
* download geben: http://trac.sakura.ne.jp/geben/
* unpack it into ~/emacs.d/ (emacs includes folder) * add this to your .emacs file:
(add-to-list 'load-path "/home/your/emacs.files/geben") (add-to-list 'load-path "/home/your/emacs.files/geben/gud")* restart emacs and run geben with `M-x geben`
* open a php service with the parameter
`?XDEBUG_SESSION_START` to start debugging
source
Friday, August 7, 2009
Difficult errors to debug in Django for Django noobs..
Got this as an debug template page today:
After some digging around and frustration, I finally figured it out. I had created a new app for my project called `newsbin`, then created a model and views and set the views up in urls.py, but I had not yet added `newsbin` to the installed apps section of settings.py. Thus it gave the above error.
TemplateSyntaxError at /admin/
Caught an exception while rendering: name 'User' is not defined
After some digging around and frustration, I finally figured it out. I had created a new app for my project called `newsbin`, then created a model and views and set the views up in urls.py, but I had not yet added `newsbin` to the installed apps section of settings.py. Thus it gave the above error.
Monday, June 29, 2009
Stupid Adventures in Djangoland
After converting a project and doing some directory wide find-replace's, I kept getting this error in django:
A little background, all my projects are usually named 'backend', with the front end code (usually flash) in a separate directory 'frontend'. So for example in settings.py, I install apps in django by adding 'backend.app' to INSTALLED_APPS. Anyway, after commenting out huge chunks of code I eventually turned to one of the last things I could turn to to start commenting stuff out. So things Amongst the urlpatterns I found a line (r'^app/', include('backend.urls')). Some how, after the find-replace session, this line was setup to constantly reference the urls.py that it resided in, which resulted in the error stated above.
TemplateSyntaxError at /admin/ Caught an exception while rendering: maximum recursion depth exceeded
Subscribe to:
Posts (Atom)