matthiasblaesing commented on pull request #3204:
URL: https://github.com/apache/netbeans/pull/3204#issuecomment-940371248


   Debugging is broken again - another corner case I suppose. Take this trivial 
code:
   
   ```java
   import java.util.ArrayList;
   import java.util.List;
   
   public class ThreadingTest {
   
       public static void main(String[] args) {
        List<Thread> ts = new ArrayList<>();
   
        for(int i = 0; i < 10; i++) {
            ts.add(new T());
        }
        
        for(Thread t: ts) {
            t.start();
        }
       }
   
       static class T extends Thread {
   
        @Override
        public void run() {
            System.out.println("L1");
            System.out.println("L2");
            System.out.println("L3");
            System.out.println("L4");
        }
   
       }
   }
   ```
   
   Place a beakpoint on line 24 (the one, that outputs "L3"). Configure the 
breakpoint to suspend all threads:
   
   ![Bildschirmfoto von 2021-10-11 
20-55-56](https://user-images.githubusercontent.com/2179736/136842812-618a7517-6c2f-438d-adc5-27be0accdbfb.png)
   
    and run it with "Debug file". The debugging control does not work anymore:
   
   ![Bildschirmfoto von 2021-10-11 
20-56-41](https://user-images.githubusercontent.com/2179736/136842828-040d0ad4-24a6-41dc-9a92-7555e442d617.png)
   
   At the time of the screenshot I would have expected line 24 to be 
highlighted, the debugging tab showing three threads (the first started, the 
cleaner and the main thread). I would expect all threads to be suspended. I 
would expect the "Playbutton" to become response. I would expect the stop 
button to stop the debugging session and let the programm run to completion.
   
   Nothing of this works. In conclusion: Debugging with "Suspend all threads" 
is broken.
   
   How shall we go on? Shall I directly create a revert commit or can this be 
fixed quickly?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to