PHP Run/Debug Configuration Support UI Spec
Author: Leon Barnard
This document is a specification of the NetBeans IDE support for Run/Debug configurations for PHP Projects.
Table of contents:
The Early Access PHP release centered around developing PHP web pages on a local machine. This is one primary use case, however there are additional use cases that need to be supported in the 6.5 release. The first new use case is PHP Scripts, where the user is executing PHP code to perform some kind of activity. These scripts do not typically output HTML and are therefore not displayed in a browser. There are also usually executed using a local PHP interpreter, rather than one located on a web server. The second new use case is Remote Development, where the user uploads their code (and other files) to a remote web server (often via FTP). This is common when the user doesn't have a web server on their local machine or when the development is shared across multiple people. Also, many users work locally during development and upload their site to a production server when it is finished.
In order to accomodate these two new use cases, the concept of Configurations will be used. This system is used in several other project types in NetBeans. Configurations allow for users to create stored settings that can be easily changed back and forth. For example, if a user has been developing locally and would like to upload their files. In this case, once they have created their configurations, the process would only involve selecting another option from the Configuration drop-down menu and running the project. The configuration applies to both Running and Debugging.
A new field has been added to the Project Properties categories - Run Configuration. The user can name their configurations whatever they want and can manage them with the New and Delete buttons. The first field below the configuration name is a choice of tye type of configuration - Local Web Site, Remote Web Site, or Script. Changing to a different option changes the fields that are shown below. In this image, the options that apply to Local Web Site are shown. The ability to manually add arguments to the file that is run has been added for this release.
Clicking Browse... in the Index Page field will bring up a dialog that shows the files inside the Sources directory, as shown below.
Remote development configurations show similar options to the user, but several fields are added that are specific to how and where the files are uploaded. So that FTP connections can be shared across projects, they will be managed separately and can be configured using the Manage button.
Clicking the Manage button will bring up the Manage Connections dialog, which will allow users to create and modify FTP profiles.
These profiles will be available globally in NetBeans, so multiple PHP (and other project types in the future) projects can share them.
Command Line configurations show the current PHP interpreter and a field for arguments. Since the PHP interpreter is a global setting, the Configure button opens the global options dialog.
A drop-down box is placed in the main toolbar. It allows users to change the current configuration and also edit or create configurations.