This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 252443 - Feature request: disable all "system.out" lines
Summary: Feature request: disable all "system.out" lines
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 8.0.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Svata Dedic
Depends on:
Reported: 2015-05-17 13:52 UTC by tmmls
Modified: 2015-10-05 11:17 UTC (History)
0 users

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description tmmls 2015-05-17 13:52:42 UTC

When building a larger application, developers add "System.out.println(..)" to the code for debugging purposes. To some people, leaving this code in the final release, will have an impact to the performance of the final build application.

Could you please add a menu item to the "source menu", enabling/disabling all "System.out.println" lines (or all output to the console commands) by placing them as comment (adding "//" in front of the line).

Comment 1 Svata Dedic 2015-10-05 11:17:31 UTC
There's already a hint which detects system.{err,out} usage. Currently it offers a fix to remove the statement.

It could be possibly enhanced to offer to 
* comment it out
* wrap the code with if (Boolean.getBoolean()) -- debug propert
* rely on Logger.isLoggable() to enable debugging.