Python Debugger with local invoke --docker

Is it possible to run python pdb when running local invoke --docker?

‘serverless invoke local --docker --docker-arg=’-i -t’ --function exportsForm’

I have a layer i want to be included with the function so I am using --docker, but I am not able to get an interactive shell when using pdb.

Error says:
the input device is not a TTY