Hi! I’m trying to use pdb’s line break debugger inside a handler:
import pdb
# more imports here
def search(event, context):
# do stuff here
pdb.set_trace()
# more stuff here
But once I invoke the function locally via $ sls invoke local -f search
, I get the following trace:
Traceback (most recent call last):
File "/usr/local/lib/node_modules/serverless/lib/plugins/aws/invokeLocal/invoke.py", line 58, in <module>
result = handler(event, FakeLambdaContext())
File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/bdb.py", line 48, in trace_dispatch
return self.dispatch_line(frame)
File "/usr/local/Cellar/python3/3.6.1/Frameworks/Python.framework/Versions/3.6/lib/python3.6/bdb.py", line 67, in dispatch_line
if self.quitting: raise BdbQuit
bdb.BdbQuit
Hope you can help, thanks!