[GH-ISSUE #3821] Debug Mode Cannot Be Disabled in Electerm Even with NODE_ENV=production #2627

Open
opened 2026-02-27 00:53:40 +03:00 by kerem · 1 comment
Owner

Originally created by @whatnik on GitHub (Feb 27, 2025).
Original GitHub issue: https://github.com/electerm/electerm/issues/3821

Electerm Version and download file extension(Electerm版本和下载文件后缀)

1.70.6

Platform detail (平台详情)

Windows 10

What steps will reproduce the bug?(重新问题的详细步骤)

I am experiencing an issue where electerm continues to run in debug mode and outputs debug logs, even when the NODE_ENV environment variable is set to production. This behavior persists regardless of the method used to set the environment variable.
Steps to Reproduce:

Open a terminal (PowerShell or Command Prompt on Windows).
Set the NODE_ENV variable to production:
powershell

$env:NODE_ENV="production"; .\electerm.exe

Observe the logs in the terminal.

What should have happened?(期望的结果)

Expected Behavior:
When NODE_ENV is set to production, debug logs (e.g., debug › ...) should not appear, and the application should run in production mode.
Actual Behavior:
Despite setting NODE_ENV=production, the application still outputs debug logs, such as:
javascript

14:38:40 debug › electerm start
14:38:42 debug › command line params { ... }
14:38:42 debug › command line opts { ... }

Would this happen in other terminal app(是否能够在其他同类软件重现这个问题)

No response

Additional information(其他任何相关信息)

Steps Tried:

Setting NODE_ENV=production in PowerShell and Command Prompt.
Checking for additional flags like --no-debug or --log-level.
Searching for configuration files in AppData\Roaming\electerm to disable debug mode.

Notes:
It seems that electerm either ignores the NODE_ENV variable or has a hardcoded debug mode enabled. If there is a specific flag or configuration to disable debug logs, it is not documented or does not work as expected. Please let me know if there is a workaround or if this is a bug that needs to be addressed.

Originally created by @whatnik on GitHub (Feb 27, 2025). Original GitHub issue: https://github.com/electerm/electerm/issues/3821 ### Electerm Version and download file extension(Electerm版本和下载文件后缀) 1.70.6 ### Platform detail (平台详情) Windows 10 ### What steps will reproduce the bug?(重新问题的详细步骤) I am experiencing an issue where electerm continues to run in debug mode and outputs debug logs, even when the NODE_ENV environment variable is set to production. This behavior persists regardless of the method used to set the environment variable. Steps to Reproduce: Open a terminal (PowerShell or Command Prompt on Windows). Set the NODE_ENV variable to production: powershell $env:NODE_ENV="production"; .\electerm.exe Observe the logs in the terminal. ### What should have happened?(期望的结果) Expected Behavior: When NODE_ENV is set to production, debug logs (e.g., debug › ...) should not appear, and the application should run in production mode. Actual Behavior: Despite setting NODE_ENV=production, the application still outputs debug logs, such as: javascript 14:38:40 debug › electerm start 14:38:42 debug › command line params { ... } 14:38:42 debug › command line opts { ... } ### Would this happen in other terminal app(是否能够在其他同类软件重现这个问题) _No response_ ### Additional information(其他任何相关信息) Steps Tried: Setting NODE_ENV=production in PowerShell and Command Prompt. Checking for additional flags like --no-debug or --log-level. Searching for configuration files in AppData\Roaming\electerm to disable debug mode. Notes: It seems that electerm either ignores the NODE_ENV variable or has a hardcoded debug mode enabled. If there is a specific flag or configuration to disable debug logs, it is not documented or does not work as expected. Please let me know if there is a workaround or if this is a bug that needs to be addressed.
Author
Owner

@zxdong262 commented on GitHub (Feb 27, 2025):

Thank you for the feedback, currently no way to turn it off, just wrong design, would improve this in future release

<!-- gh-comment-id:2687343169 --> @zxdong262 commented on GitHub (Feb 27, 2025): Thank you for the feedback, currently no way to turn it off, just wrong design, would improve this in future release
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/electerm#2627
No description provided.