---
title: UI Actions With Debugging Statements
description: "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…"
url: "https://community-staging.qualityclouds.com/qcdocs/qc/javascript-rules-rules-for-servicenow/ui-actions-with-debugging-statements/"
updated: "2025-03-21"
category: Best Practices Rules / JavaScript Rules
---

# 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); }
