diff --git a/src/_pdbpp_path_hack/pdb.py b/src/_pdbpp_path_hack/pdb.py
index <HASH>..<HASH> 100644
--- a/src/_pdbpp_path_hack/pdb.py
+++ b/src/_pdbpp_path_hack/pdb.py
@@ -9,5 +9,9 @@ else:
 
     pdb_path = os.path.join(os.path.dirname(code.__file__), 'pdb.py')
 
+# Set __file__ to exec'd code.  This is good in general, and required for
+# coverage.py to use it.
+__file__ = pdb_path
+
 with open(pdb_path) as f:
     exec(compile(f.read(), pdb_path, 'exec'))
_pdbpp_path_hack/pdb.py: set __file__

Required for coverage.py since it uses the same filename.
Ref: <URL>