agreeing to give a way the source code, you should not give them unless they pay for the code. However, if there was a contract....
Once I hired a guy for some work and did not ask the code in contract, he did not give me, but he did debug later.
Once I hired a guy for some work and did not ask the code in contract, he did not give me, but he did debug later.