Karen when you say the transfer only works in debug mode, I assume you are referring to Reactive Debug. If that is correct, then how are you dialing into the CTI Route Point externally or internally.
In case, if you have tested both ways and it worked fine during the reactive debug but dos not work when the script is being applied to an application. Then can you check if there are any values you might be setting from the application itself overriding the values in script. If this had been checked as well, the n provide CCX Engine logs along with calling, called number.
If you have not restarted the CCX Engine, then it is worth to give that a try as well in after hours.
Regards
Deepak