There are no good solutions to this problem. One way to share data between parties is a table (permanent or temporary). So you can have some logic that depends on some state of this table or the value of specific columns in this table:
--CREATE TABLE debug(col int) --INSERT INTO debug VALUES(1) --DELETE FROM debug SELECT 1 GO SELECT 2 SELECT 3 GO IF EXISTS(SELECT * FROM debug) SELECT 6 GO
Just add IF EXISTS(SELECT * FROM debug) this line anywhere in the script you want to skip, and depending on whether the table has multiple lines or these code blocks will not execute.
source share