To complement @tashuhka answer (i.e using dbstack), and depending if you want to keep variables in the global scope, another solution is to turn your script into function and pass optional parameter to 'analysis.m'.
function [] = foo(doDebugPlot)
%[
% Check params
if (nargin < 1), doDebugPlot = true; end
% Code
...
% Debug
if (~doDebugPlot), return; end
plot(lala);
plot(tutut);
%]