add _is_debugger so load_dotenv will work in pdb by randomseed42 · Pull Request #553 · theskumar/python-dotenv

add below to find_dotenv, so that when user run load_dotenv() in pdb or other debugger, they can still load the .env file in current working directory, otherwise current frame_filename will goes to Lib/bdb.py

def _is_debugger():
    return sys.gettrace() is not None

if usecwd or _is_interactive() or _is_debugger() or getattr(sys, "frozen", False):
    ...