There are cases where code needs to act differently if running in Visual Studio Code.
Does anybody know the most efficient way to detect that the python code is running in the Visual Studio Code debugger?
So far, the best way I could find was using:
import sys
if 'debugpy' in sys.modules:
print("Running in VS Code")