Maybe you did not understand my problem.
I want to store some tables during the script load to the qvd-files with "STORE tablename to filename.qvd;"
And if I reload the script with DEBUG and limit rows to 10, then I do not wan't to store anything in the script. Because these stored.qvd files are used as data-storage also.
There is no way to know when a reload is started in debug or normal mode. But there is a function to know when it was done Partial.
What I do in some cases is set the STORE instructions at the bottom part, and in a conditional I manually have to set, so I can debug and see how the tables, relations are created and dropped, but the tables are not stored. Then I change the variable manually and the reload stores all tables.
Hope that helps.
I know, this is an rather old thread, but as I stumbled over the same question, here my way of solution.
Instead of prefixing with IF, I use $-expansion:
SET STORECMD = '//STORE'; //use this to avoid 'store'
//SET STORECMD = 'STORE'; //use this to do the 'store'
$(STORECMD) MyTable into MyFile (qvd);