I am wondering whether there is the possibility to debug a given Python code (e.g. a Python test script in an extension) against the 3D Slicer HEAD that we may have checked out and compiled.
Otherwise, using an installed version of Slicer does not strictly guarantee that any fix to a given extension will work with the 3D Slicer HEAD.
Yes, this is the preferred method of testing extensions, as this method works for both Python and C++ modules. (it may be hard to ensure ABI compatibility of C++ code built on different computers)
If you reproduce a problem on your computer and then fix it on your computer then it is practically guaranteed that the problem will be fixed on the factory computer, too.