First time here? Check out the FAQ!

Revision history  [back]

Debugging Externally Launched Code (Celery)

Hi,

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(>) 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 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

Thanks,

Eric

Debugging Externally Launched Code (Celery)

Hi,

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(>) 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 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

Thanks,

Eric

Debugging Externally Launched Code (Celery)

Hi,

I'm Hi,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 'app_web.tasks.tasks']import wingdbstubx = 0 / 0
# 
0# import pdb; pdb.set_trace()
print(True)

When 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(>) called: This breaks some debugger functionality. Use 'Ignore Use'Ignore this exception location' in the Exceptions tool and restart debugging to suppress this warning but warningbut since I didn't get an exception in the IDE I don't see how to ignore it.

I  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 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 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

Thanks,

Ericas celery_worker.pyThanks,Eric