Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-2950

Cannot finish app by stopping debugging

    XMLWordPrintableJSON

Details

    Description

      When I create Gradle/Java Application and try to debug it, it doesn't stop when I press the "Finish Debugging" button. That is weird and certainly different to behavior of Maven and Ant projects. Example:

      public class Main {
      
          public static void main(String[] args) throws Exception {
              int cnt = 0;
              while (true) {
                  Thread.sleep(1000);
                  System.out.println("counting " + ++cnt);
              }
          }
          
      }

      Debug the project. Then press the big red button in the debugger toolbar. The debugger disconnects, but immediately reconnects again and the application continues. I find this unexpected. Output of one of my executions:

      > Task :compileJava
      > Task :processResources NO-SOURCE
      > Task :classes
      
      > Task :run
      Listening for transport dt_socket at address: 5005
      counting 1
      counting 2
      counting 3
      counting 4
      counting 5
      Listening for transport dt_socket at address: 5005
      counting 6
      Listening for transport dt_socket at address: 5005
      Listening for transport dt_socket at address: 5005
      counting 7
      counting 8
      BUILD ABORTED

      At the end I pressed the "small red" button in on the left side of the output window and that one terminates the app - e.g. workaround exists.

      Attachments

        1. GradleSuccess.jpeg
          54 kB
          Steven Ingram
        2. pullReqFix.jpeg
          48 kB
          Steven Ingram

        Issue Links

          Activity

            People

              lkishalmi Laszlo Kishalmi
              jtulach Jaroslav Tulach
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m