function openPort = getDebugPort()
%getDebugPort()   finds the debug  Network Port

% Copyright 2020 The MathWorks, Inc.

% Disable debug port if we are not in MW env
if isempty(getenv("MW_INSTALL"))
    openPort = 0;
    return;
end

% Use a static debug port per MATLAB session
openPort = matlab.internal.cef.getDebugPort();
