UI Actions with debugging statements
Impact area
Scalability
Severity
Low
Affected element
UI Action
Rule number
SN-0151
Impact
Debug statements in the production environment can affect performance and potentially cause sensitive data to leak out.
Remediation
Remove the logging functions entirely, or control their use with a property. At the minimum, switch to using gs.info and gs.debug.
Time to fix
10 min
Code examples
Noncompliant code
for (i = 1; i<6; i++) { // Print i to the Output window. Debug.write("loop index currently is " + i); // Wait for user to resume. debugger; }
Compliant code
for (i = 1; i<6; i++) { // Print i to the Output window. Debug.write("loop index currently is " + i); }
What's here