使用Eclipse和PyDev对Django进行调试 [英] Django debugging with Eclipse and PyDev

查看:99
本文介绍了使用Eclipse和PyDev对Django进行调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚设法调试我的django站点在Eclipse中工作。我的所有断点都被捕获得很好,但是每当我进行代码更改时,我都必须重新启动服务器。我认为这是因为我在启动服务器时使用了--noreload参数。



有没有办法设置Eclipse调试,以便我可以更改代码,并继续执行,我的更改立即反映在django站点中。



干杯,
Dave



Fedin#Django的Trindaz

解决方案

这个有点迟了,但是如果有人另外找到解决同样问题的解决方案:



视频当我尝试使用 autoreload 设置Django Eclipse调试时,非常有用,即不使用 - noreload 开关。几乎有几个有用的指针,几乎可以引导您完成这些步骤。我已经使用这个视频设置了两次。



manage.py 替换代码可以从< a href =http://djangosnippets.org/snippets/1561/ =nofollow noreferrer> http://djangosnippets.org/snippets/1561/



我发现这些链接通过海报的博客帖子,似乎目前正在关闭,因此直接链接



编辑 :Django 1.3可能需要一个修补程序才能在IDE中从 autoreload 模式运行。有关详细信息,请参阅 PyCharm manage.py runserver错误


I just managed to get debugging my django site 'kind of' working in Eclipse. All my breakpoints get caught just fine, but I have to restart the server every time I make a code change. I think this is because I'm using the --noreload argument when kicking off the server.

Is there any way to setup Eclipse debugging so that I can change code, and continue execution, with my changes being reflected in the django site straight away?

Cheers, Dave

Trindaz on Fedang #django

解决方案

This is a bit late, but in case someone else comes looking for a solution to the same problem:

This video was very helpful when I was trying to setup Django Eclipse debugging with autoreload i.e. without using the --noreload switch. It pretty much walks you through the steps with a couple of helpful pointers. I've set up twice myself using this video.

The manage.py replacement code can be obtained from http://djangosnippets.org/snippets/1561/

I found these links through the poster's blog post which seems to be down at the moment, hence the direct links

EDIT: A patch may be required to Django 1.3 to run in autoreload mode from inside an IDE. See PyCharm manage.py runserver error for more information.

这篇关于使用Eclipse和PyDev对Django进行调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆