Add a main to run files like pdb: python -m wdb ./myscript.py
Adapt  __main__