[test][utils] Add helper method to use pdb whith click

The click package alters stdin and stdout which makes it impossible
to debug. This helper method does the necessary to setup a working
pdb session.
2 jobs for fix_tests in 11 minutes and 16 seconds (queued for 1 second)