【轉】在Eclipse中使用PyDev調試Django(圖文版)


http://www.cnblogs.com/wj110reg/archive/2009/07/24/1530252.html

1.打開debug配置

000

2.新建一個調試

00

3.選擇manager.py文件

01

4.在Arguments tab 中添加runserver –noreload

02

5.在Environment tab 添加兩個變量:

DJANGO_SETTINGS_MODULE:settings

PYTHONPATH: $PWD

03

6配置完成,在Debug中運行新建的調試。

04

原文:

In order to debug, the preferred way for me, is to do it through the Eclipse with PyDev configured for Django. To do this, we need a couple more of adjustments in order to get the django runserver running properly.
We go the main menu and we select the Open Run Dialogue... window, there we select on the left Python Run and on the Main tab to the right we select the project where we are going to make the debugging: /some/path/to/sources/manage.py.
In the Arguments tab we add the Program Arguments: runserver --noreload and then we finally select the Environment tab where we add the DJANGO_SETTINGS_MODULE set to value settings and PYTHONPATH set to value $PWD. Click Apply and Run.
If you look at the console view, you will see the runserver output which indicates that all is well:
Validating models...
0 errors found
Django version 0.97-pre-SVN-unknown, using settings 'txm.settings'
Development server is running at [url]http://127.0.0.1:8000/[/url]
Quit the server with CONTROL-C.


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM