About Stub function

Hi everyone,
I am a newbie here and I surfed lots of articles in 'help contents', but still got little sense about stub functions. Suppose that I have a source data library and use it in a Test Case writen by my own. And I want to know more information(for instance, the variable values calculated in one section inside the tested function). But my Test Case can only input values and got results all 'outside' calling the tested function. I mean, like..