When I use "-m pdb", some code is not working properly. So I want to know if there is a way to see if the file is run using "-m pdb" to choose different method to run my code.
You can test with :
"pdb" in sys.modules