Use RAISERROR with severity 0 (not actually raising any error, just printing a message) to display the state of affairs inside the procedure at any stage of execution.
That's how it goes:
DECLARE @Var1 varchar(50), @Var2 int, @RC int
SELECT @Var1 = APP_NAME()
SELECT @RC = @@ROWCOUNT
IF APP_NAME() LIKE '% Query%'
RAISERROR ('Query 1 within Cursor, Rows Affected: %d, Current VAR values: @Var1="%s", @Var2=%d ', 0,1, @RC, @Var1, @Var2) WITH NOWAIT