Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note: this configuration includes the Shibboleth project's standard Apache 2 license header. Code contributed to the Shibboleth project must contain this header. However, if you are not planning to contribute the code you'll probably want to change this. To do so, go to your project's properties and in Java Code Style -> Code Templates adjust Comments -> File to whatever you want it to be.

External Debugging

Java generally allows for debugging by connecting to a process and by asking a process to connect to the debugger. With respect to Jetty, the former did not work for Scott, but the latter did work.

First, create a Java Debug... configuration for one of the projects and set Connection Type to "Standard (Socket Listen)". You can select the port and connection limit as required.

To start Jetty in a typical way from the command line and ask it to connect to Eclipse on port 8888:

Code Block
$ java -agentlib:jdwp=transport=dt_socket,address=localhost:8888 -jar /opt/jetty/jetty-9.4/start.jar

This stopped on breakpoints and seemed to behave in the expected ways. Obviously it could be tricky if the project code state doesn't match what's inside Jetty.