Debugging Externally Launched Code (Celery)
I'm trying remote debugging for the first time and can't get it to trigger. I am trying to debug a problem I'm having getting Celery to run. I've put the import wingdbstub, etc. code in my worker code and set a break point on the print statement.
celery_app.conf.imports = [ 'app_web.tasks.tasks'] import wingdbstub x = 0 / 0 # import pdb; pdb.set_trace() print(True)
When I ran Celery ( celery worker -A celery_worker.celery_app --loglevel=info ), the debugger didn't fire. I added the pdb statements and I got a RuntimeError:WARNING: sys.settrace(<bound method="" bdb.trace_dispatch="" of="" <pdb.pdb="" object="" at="" 0x04c71d90="">>) called: This breaks some debugger functionality. Use 'Ignore this exception location' in the Exceptions tool and restart debugging to suppress this warning but since I didn't get an exception in the IDE I don't see how to ignore it.
I then added the divide by 0 which throws an exception hoping to trigger the debugger but nope. File "D:\SVNRepo\projects-sw\ESI\trunk\env\src\celery_worker.py", line 46, in <module> x = 0 / 0ZeroDivisionError: division by zeroOn Windows celery.exe is starting the process but pdb has been triggering in celery_worker, can I get Wing to trigger?
Win 7/64, Python 3.6.2 (Anaconda), Wing 6.0.7-1 (rev 47fe5b0dd72b), accept debug connections is checked, wingdbstub.py and wingdebugpw are in the same directory as celery_worker.py