How to Deploy Files for a Remote Debug Launch in Eclipse Cdt

Best way to debug Java web application packaged as a WAR using Eclipse and Maven?

If you run your WAR with tomcat/jetty plugin pass debug options to the Maven:

export MAVEN_OPTS="-Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000" mvn tomcat:run

If you run your WAR using the regular Tomcat, just run it with JPDA (debugger) support enabled:

$TOMCAT_HOME/bin/catalina.sh jpda start

Default port for Tomcat 6 JPDA is 8000.

Now connect with the Eclipse (Debug -> Remote Java Application) to the port 8000 and enjoy your fine debugging session.

Work on a remote project with Eclipse via SSH

Try the Remote System Explorer (RSE). It's a set of plug-ins to do exactly what you want.

RSE may already be included in your current Eclipse installation. To check in Eclipse Indigo go to Window > Open Perspective > Other... and choose Remote System Explorer from the Open Perspective dialog to open the RSE perspective.

To create an SSH remote project from the RSE perspective in Eclipse:

  1. Define a new connection and choose SSH Only from the Select Remote System Type screen in the New Connection dialog.
  2. Enter the connection information then choose Finish.
  3. Connect to the new host. (Assumes SSH keys are already setup.)
  4. Once connected, drill down into the host's Sftp Files, choose a folder and select Create Remote Project from the item's context menu. (Wait as the remote project is created.)

If done correctly, there should now be a new remote project accessible from the Project Explorer and other perspectives within eclipse. With the SSH connection set-up correctly passwords can be made an optional part of the normal SSH authentication process. A remote project with Eclipse via SSH is now created.

how can I use eclipse to debug a libtool generated script?

Running a script instead of an executable is still unsupported in Eclipse, see this bug. Until the feature is introduced, you cannot debug a libtool-enabled project under Eclipse unless you keep something like a

    path/to/configure --disable-shared

separate configuration, thus relying on static linking only for debugging purposes.

To do that, you

  1. Open Project|Properties from the top menu

  2. Select Autotools|Configure Settings from the left menu of the window

  3. (Optionally) Create a new build configuration with a dedicated C/C++ Build|Builder Settings|Build location

  4. Under configure|Advanced, fill the "Additional command-line options" with --disable-shared



Related Topics



Leave a reply



Submit