Creating A Debug Target for a Free-Form Web Project

See Also 

In a , you must set up your own Ant target to run a project in the debugger. However, you can use the IDE to generate a debug target for you. When you do so, the IDE maps the debug target to the Debug Project command. Alternatively, if you have your own debug target, you must map it to the Debug Project command yourself.

To generate a debug target:

  1. Choose Debug > Debug Main Project (Ctrl-F5). If no target is mapped to the Debug Project command, you are prompted to let the IDE generate an IDE-specific debug target in nbproject/ide-targets.xml.
  2. Click Generate. The IDE does the following:
  3. In the Files window, go to the nbproject/debug.properties file and edit the debug properties, if necessary.

If you use the IDE to generate the debug target, as described in the previous section, the target is automatically mapped to the Debug Project command. However, if your debug target was not generated by the IDE, you must map it to the Debug Project command manually.

To map a debug target to the Debug Project command:

  1. In the Projects window, right-click the project node and choose Properties.
  2. Click Build and Run in the left panel of the Project Properties dialog box.
  3. Click Add, select your debug target, and type a label, such as "Debug Project".

To use a debug target in a free-form web project:

  1. Set breakpoints in your source files.
  2. Right-click the project node in the Projects window, choose Properties, click Java Sources in the Project Properties dialog box, and make sure that all the source files you want to debug are listed in the Source Package Folders list.
  3. In the Services window, expand the Servers node, right-click the server instance and choose Start/Stop Server.
  4. Click Start Server (Debug).
  5. Make sure that you have a debug target and that it is mapped to the Debug Project command, as described in the previous sections.
  6. Choose Debug > Debug Main Project (Ctrl-F5).

For a full guide to configuring free-form projects, see:

See Also
About Free-Form Projects
About Debugging and Testing Web Applications
Writing A Debug Target for a Free-Form Java Project

Legal Notices