Bug 565664 - Method Exit Breakpoints very slow in Eclipse when using Log4j2
Summary: Method Exit Breakpoints very slow in Eclipse when using Log4j2
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.16   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-29 13:27 EDT by dave debugger CLA
Modified: 2022-08-17 16:33 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dave debugger CLA 2020-07-29 13:27:24 EDT
When I set a Method breakpoint, of type Exit, in Eclipse with any log4j2 logging instantiated in a class then there's an approx 20 second delay before the program starts.  This delay is not present on the same project when the logging instantiation is commented out.  No actual logging needs to take place for this behaviour to manifest itself.

So this simple project in Eclipse is fine:

package slowdebug;
public class SlowDebug {

 public static void main(String[] args) { 
  System.out.println("Hello world"); 
  thisWontTakeLong(); 
  System.out.println("The end"); 
 }

 private static void thisWontTakeLong() { 
  System.out.println("BRB"); 
 } 
}

But adding the 2 log4j2 jars to the project and adding: 

 private static Logger logger = LogManager.getLogger(SlowDebug.class);
 
and setting a Method exit breakpoint on thisWontTakeLong(), editing it to make it an exit breakpoint not an entry one and the delay appears.

The delay occurs even if the call to thisWontTakeLong() is commented out. It doesn't seem to matter which method has the exit breakpoint.

 

I'm using log4j2 v2.13.3 on Windows 10 Enterprise, Eclipse Version: 2020-06 (4.16.0) Build id: 20200615-1200, Java SE14 (14.0.2, the open source one)

I opened a ticket on the log4j2 bug tracker (https://issues.apache.org/jira/browse/LOG4J2-2900) but really it's hard to see how it's a log4j2 issue
Comment 1 Eclipse Genie CLA 2022-08-17 16:33:24 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.