Child pages
  • Configuring a Project in Eclipse
Skip to end of metadata
Go to start of metadata



Before Eclipse can be used to debug ColdFusion applications, you must configure a project in the Navigator. This enables FusionDebug to locate the correct source code to respond to debugging events like breakpoints, steps etc.

Creating a new Project in Eclipse

In our example, we have installed some test files inside the default IIS web folder, and we're going to use these as the basis of our project.

The files are located in c:\inetpub\wwwroot\cfapp

  1. Start Eclipse if it's not already running, and switch to the FusionDebug Perspective if it does not open automatically (Eclipse remembers the last perspective you used before you shut it down last).
  2. In the Navigator view, right click and select New -> Project.
  3. The New Project  wizard appears.
  4. Open the General tree branch, and select Project.
  5. Enter a meaningful name for your project (we're using “CF Test Application”), and uncheck the option 'Use default location'.
  • Since we already have existing files, we can use these instead of starting a new project in the workspace.

     6. Locate the folder containing the files we want to create a new project for (in c:\inetpub\wwwroot\cfapp) using the Browse button, and click OK.

     7. Click Finish to complete the wizard.

After completing the wizard, the new project appears.  You can double-click on any files within the project to begin editing them.  Do not delete the .project file – that's an Eclipse internal file used to keep track of your project.

Creating a FusionDebug Configuration

This section shows you how to set up a FusionDebug configuration to connect to your local machine and begin debugging.  It's very important to carefully read and understand these instructions, since setting up a working FusionDebug Configuration is a key step.

  1. Open the Debug dialog using the Run -> Debug menu option.
  2. Right-click the FusionDebug element on the left of the dialog and select New.  The FusionDebug configuration page appears in the dialog.
  3. Enter a meaningful name in the Name: field.  This should be something which describes this configuration.  We're using “Simple Debug Configuration”.
  4. Select the Connector; this should be based on the type of server you are debugging. Currently ColdFusion 6.1, 7, 8, 9, 10 and Railo 3 and 4 are supported.
  5. Since we're going to connect to our local machine, leave the Host as it is – localhost.  The port defaults to 8000.  If you didn't change it when running the Server Configuration Wizard , or setting up JRun for debugging , leave it as it is.  Otherwise, enter the same port here as you used previously.
  6. Optionally select which runtime exceptions to break on.
  7. Before we can complete the configuration, we must add at least one Source Code Lookup to tell FusionDebug where the ColdFusion files are located on the server. Click on the Source Code Lookup tab to bring up the Lookup Table.

This table tells FusionDebug where the files are located on the server.  You must enter at least one rule in this table.

When you launch the configuration later, FusionDebug will compute the actual locations of the breakpoints, and display them along with the breakpoints themselves in the Breakpoints View.  Since we only have one project, we'll use the global <All Projects> rule and the c:\inetpub\wwwroot\cfapp folder.  Enter this data in the upper area and click Add. Click apply if everything worked as expected, and you should now see a screen like the following:

Figure 15: Setting the 'All Projects' Mapping

8. Go back to the "Connect" Tab and ensure the correct connector/host/port are being used and click "Debug".

Figure 16: FusionDebug Configuration for Local Machine

 9. The dialog should disappear, and FusionDebug should connect to the local Java instance. If this succeeds, the Debug View will display the debug configuration and debug target, as shown in Figure 17.

Figure 17: Successful Connection


  • No labels