uWSGI에서 파이썬 pdb 디버거를 사용하려고 할 때 실행이 중단 점에서 중지되지 않고 트랙백 만 반환합니다. 나는 그것을 실행하는 방법uWSGI에서 파이썬 응용 프로그램을 디버깅하는 방법은 무엇입니까?
def application(env, start_response):
import pdb; pdb.set_trace()
start_response('200 OK', [('Content-Type','text/html')])
return "Hello World"
이것이다 : 여기
코드입니다uwsgi --http 127.0.0.1:7777 --wsgi-file uwsgi_test.py
이 내가 무엇을 얻을 수 있습니다 :
/home/andrey/Development/ttt/uwsgi_test.py(3)application()
-> start_response('200 OK', [('Content-Type','text/html')])
(Pdb)
Traceback (most recent call last):
File "uwsgi_test.py", line 3, in application
start_response('200 OK', [('Content-Type','text/html')])
File "uwsgi_test.py", line 3, in application
start_response('200 OK', [('Content-Type','text/html')])
File "/usr/lib/python2.7/bdb.py", line 48, in trace_dispatch
return self.dispatch_line(frame)
File "/usr/lib/python2.7/bdb.py", line 67, in dispatch_line
if self.quitting: raise BdbQuit
bdb.BdbQuit
[pid: 11421|app: 0|req: 1/1] 127.0.0.1() {32 vars in 366 bytes} [Sun Aug 25 13:12:06 2013] GET/=> generated 0 bytes in 63 msecs (HTTP/1.1 500) 0 headers in 0 bytes (0 switches on core 0)
수동으로 중단 점을 삽입 할 때'set_trace() '를 사용하는 대신) 디버깅을 시도한 적이 있습니까? –
IDE가없는 간단한 텍스트 편집기에서 개발하고 있습니다. 그래서 제가 알고있는 유일한 선택은 중단 점입니다. – Anderson
이 게시물을 확인하십시오 : http://stackoverflow.com/questions/6980749/simpler-way-to-put-pdb-breakpoints-in-python-code 좋은 IDE 외에도 정말 삶이 훨씬 쉬워 질 수 있습니다 (생산성 등을 높이는 데 도움이됩니다.) –