Merge #11023: [tests] Add option to attach a python debugger if functional test fails