You can't do a private checkout of a function. The easiest way to test the code is to create your own library, create a function (name it whatever you like) and then call the library.function(). If you need to add debugging code, Kevin's suggestions should be helpful.
Actaully I have had success with this mechanism of doing a checkout on a function. Private Checkout RUF using pzPrivateCheckOut activity Add oLog.error(); statements as required Click “Generate Function”