For the purpose you need, the best way is to use RAISERROR like that:
RAISERROR ('My debugging text', 10,1) WITH NOWAIT
It's the same as PRINT, but it guaranteed to be returned back to client as soon as SQL server executes it.
_____________________________________________
"The only true wisdom is in knowing you know nothing"
"O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
(So many miracle inventions provided by MS to us...)
How to post your question to get the best and quick help[/url]