(Spyder dev here) According to the documentation you need to prefix variable names with !
if their names are the same that pdb
commands. That's the easy way to solve your problem.
The hard way is to define your own sitecustomize
, subclass pdb.Pdb
and redefine it's do_p
, do_d
, do_b
methods to print your variables. You can check out how we subclass pdb.Pdb
for our own purposes here, in case you want to follow this path.