To continue my last post, launching a Lift program and debugging from Eclipse turns out to be straightforward.
The starting point was this stackoverlow thread which pointed out the existence of the RunJettyRun Eclipse plugin, which can launch a Jetty instance from within Eclipse configured for remote debugging. Here are the steps to get launching and debugging working seamlessly:
- Install RunJettyRun from within Eclipse the usual way, ie. menu Help > Install New Software, then copy-paste this link.
- Once installed, go to menu Run > Debug Configurations, and double-click Jetty Webapp. This will create a new configuration for this project.
- Click Apply to save this configuration, and you can now start debugging to your heart's content.
NOTE: running Jetty in SBT via ~container:start puts the web app in the root of the web server, ie.
http://localhost:8080/, but this plugin defaults to
http://localhost:8080/project_name. You can change this via the "Context" parameter in the debug configuration. This defaults to the project name, presumably so you can run/debug multiple web apps simultaneously.