title: Breakpoints does not work in lambda expression in Java
body: <p>I cannot understand what the following code does:</p>
  
  <pre><code>public class Main {
  
      public static void main(String[] args) throws UnsupportedProtocolException, IOException {
          new Thread(() -&gt; {
              PropertiesLoader loader = new PropertiesLoader();
              loader.load(args);
              System.out.println(loader.getProperties());
          });
      }
  }
  </code></pre>
  
  <p>I have put breakpoints in all lines of the main method but only the breakpoint at the line starting with <code>new Thread</code> gets hit.</p>
  
  <p>However, no breakpoints in the lambda expression's body gets hit.</p>
  
  <p>Plus, I don't understand what this code does. AFAIU, the lambda expression does not return any values. Hence, the code does not supply any arguments to <code>Thread</code> constructor.</p>
  
  <p>Plus, I don't understand why is there a thread creation here.</p>
  
  <p>Could you help me on how to reach inside of the lambda expression using breakpoints?</p>