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

NetBeans fails silently if it can't attach a debugger

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 11.1, 11.2
    • Fix Version/s: None
    • Component/s: debugger - Java
    • Labels:
      None

      Description

      When trying to attach a debugger to an existing Java process, the operation simply does nothing if the attempt fails with no feedback to the user.

      messages.log contains details, but note the odd repetition of the attach parameters in the log messages:

       

      INFO [org.netbeans.api.debugger.jpda.AttachingDICookie]: Attaching Connector = com.sun.jdi.ProcessAttach (defaults: pid=, timeout=), arguments = {pid=pid=14420, timeout=timeout=}INFO [org.netbeans.api.debugger.jpda.AttachingDICookie]: Attaching Connector = com.sun.jdi.ProcessAttach (defaults: pid=, timeout=), arguments = {pid=pid=14420, timeout=timeout=}java.io.IOException: Access is denied at com.sun.tools.jdi.ProcessAttachingConnector.attach(ProcessAttachingConnector.java:104)[catch] at org.netbeans.api.debugger.jpda.AttachingDICookie.getVirtualMachine(AttachingDICookie.java:206) at org.netbeans.modules.debugger.jpda.actions.StartActionProvider.doStartDebugger(StartActionProvider.java:163) at org.netbeans.modules.debugger.jpda.actions.StartActionProvider.access$200(StartActionProvider.java:55) at org.netbeans.modules.debugger.jpda.actions.StartActionProvider$1.run(StartActionProvider.java:140) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418) at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45) at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)INFO [org.netbeans.api.debugger.jpda.AttachingDICookie]: Attaching Connector = com.sun.jdi.SocketAttach (defaults: timeout=, hostname=DCM-Scott-01, port=), arguments = {timeout=timeout=, hostname=hostname=DCM-Scott-01, port=port=44448}java.net.ConnectException: Connection refused: connect at java.net.DualStackPlainSocketImpl.connect0(Native Method) at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at com.sun.tools.jdi.SocketTransportService.attach(SocketTransportService.java:222) at com.sun.tools.jdi.GenericAttachingConnector.attach(GenericAttachingConnector.java:116) at com.sun.tools.jdi.SocketAttachingConnector.attach(SocketAttachingConnector.java:90)[catch] at org.netbeans.api.debugger.jpda.AttachingDICookie.getVirtualMachine(AttachingDICookie.java:206) at org.netbeans.modules.debugger.jpda.actions.StartActionProvider.doStartDebugger(StartActionProvider.java:163) at org.netbeans.modules.debugger.jpda.actions.StartActionProvider.access$200(StartActionProvider.java:55) at org.netbeans.modules.debugger.jpda.actions.StartActionProvider$1.run(StartActionProvider.java:140) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418) at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45) at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)INFO [org.netbeans.api.debugger.jpda.AttachingDICookie]: Attaching Connector = com.sun.jdi.SocketAttach (defaults: timeout=, hostname=DCM-Scott-01, port=), arguments = {timeout=timeout=1000, hostname=hostname=DCM-Scott-01, port=port=44448}com.sun.jdi.connect.TransportTimeoutException: timed out trying to establish connection at com.sun.tools.jdi.SocketTransportService.attach(SocketTransportService.java:227) at com.sun.tools.jdi.GenericAttachingConnector.attach(GenericAttachingConnector.java:116) at com.sun.tools.jdi.SocketAttachingConnector.attach(SocketAttachingConnector.java:90)[catch] at org.netbeans.api.debugger.jpda.AttachingDICookie.getVirtualMachine(AttachingDICookie.java:206) at org.netbeans.modules.debugger.jpda.actions.StartActionProvider.doStartDebugger(StartActionProvider.java:163) at org.netbeans.modules.debugger.jpda.actions.StartActionProvider.access$200(StartActionProvider.java:55) at org.netbeans.modules.debugger.jpda.actions.StartActionProvider$1.run(StartActionProvider.java:140) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418) at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45) at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033) 

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              swpalmer Scott Palmer
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: