While active open file (because “program” param set to ${file}) is the Python application, for example “detection.py”, run the configuration. This will try to debug the code but will show some error, while a Python debug terminal will open representing Pi remote folder with the code.
In that terminal execute:
cd hailo-rpi5-examples
source setup_env.sh # or “. s” and hit tab
export DISPLAY=:0 # since current active display is PC and Pi connected remotely via SSH
In the Python application code, for example “detection.py”:
import debugpy
def app_callback(pad, info, user_data):
debugpy.listen(("127.0.0.1", 5688)) # port number meaningless
debugpy.wait_for_client()
breakpoint() # or wherever actual break point required
...
While active file is the Python application, for example “detection.py”, Run the configuration. This time it will debug and stop at the breakpoint.