Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-23961

Server adapter: "Start/Restart in Debug" is broken for Nodejs

    Details

    • Sprint:
      devex #128 February 2017
    • Steps to Reproduce:
      Hide
      1. ASSERT: have a nodejs application running in OpenShift, the project imported to your workspace and a server adapter created for it.
      2. EXEC: pick your server adapter for your nodejs application and choose "Restart in Debug" or "Debug" (depending on if the adapter already is started or not) from the context menu

      Result:

      You get an error popping up that tells you that your server adapter could not be launched.
      In the Eclipse log you'll spot the following:

      java.lang.IllegalArgumentException: port out of range:-1
      	at java.net.InetSocketAddress.checkPort(InetSocketAddress.java:143)
      	at java.net.InetSocketAddress.<init>(InetSocketAddress.java:224)
      	at org.eclipse.wst.jsdt.chromium.debug.core.model.JavascriptVmEmbedderFactory.connectToStandalone(JavascriptVmEmbedderFactory.java:193)
      	at org.eclipse.wst.jsdt.chromium.debug.ui.launcher.StandaloneV8LaunchType.createConnectionToRemote(StandaloneV8LaunchType.java:30)
      	at org.eclipse.wst.jsdt.chromium.debug.ui.launcher.LaunchTypeBase.launch(LaunchTypeBase.java:69)
      	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885)
      	at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739)
      	at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039)
      	at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256)
      	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
      

      Notice how the server adapter is in debugging state even though the debugger is not launched/attached:

      Show
      ASSERT: have a nodejs application running in OpenShift, the project imported to your workspace and a server adapter created for it. EXEC: pick your server adapter for your nodejs application and choose "Restart in Debug" or "Debug" (depending on if the adapter already is started or not) from the context menu Result: You get an error popping up that tells you that your server adapter could not be launched. In the Eclipse log you'll spot the following: java.lang.IllegalArgumentException: port out of range:-1 at java.net.InetSocketAddress.checkPort(InetSocketAddress.java:143) at java.net.InetSocketAddress.<init>(InetSocketAddress.java:224) at org.eclipse.wst.jsdt.chromium.debug.core.model.JavascriptVmEmbedderFactory.connectToStandalone(JavascriptVmEmbedderFactory.java:193) at org.eclipse.wst.jsdt.chromium.debug.ui.launcher.StandaloneV8LaunchType.createConnectionToRemote(StandaloneV8LaunchType.java:30) at org.eclipse.wst.jsdt.chromium.debug.ui.launcher.LaunchTypeBase.launch(LaunchTypeBase.java:69) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:885) at org.eclipse.debug.internal.core.LaunchConfiguration.launch(LaunchConfiguration.java:739) at org.eclipse.debug.internal.ui.DebugUIPlugin.buildAndLaunch(DebugUIPlugin.java:1039) at org.eclipse.debug.internal.ui.DebugUIPlugin$8.run(DebugUIPlugin.java:1256) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Notice how the server adapter is in debugging state even though the debugger is not launched/attached:

      Gliffy Diagrams

        Attachments

        1. image-2017-02-16-23-30-21-709.png
          35 kB
          André Dietisheim
        2. jbide-23961-restart-1.png
          27 kB
          Pavol Srna
        3. jbide-23961-restart-2.png
          30 kB
          Pavol Srna
        4. server-adapter-erroneous-debugging-state.png
          24 kB
          André Dietisheim

          Issue Links

            Activity

              People

              • Assignee:
                adietish André Dietisheim
                Reporter:
                adietish André Dietisheim
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: