To load a .py file in the Python interactive shell for debugging, use the command "python -i filename.py". This command executes the specified Python file and then enters interactive mode, allowing users to interact with the environment created by the script. Additionally, some users incorporate this functionality directly into their scripts by starting with the shebang line "#!/usr/bin/python -i", enabling immediate access to the interactive shell upon execution. This method facilitates debugging by maintaining the context of the script's execution.