Debugging a Script Host Application
To create a launch configuration that will launch a script host application ( .js or .vbs) for debugging, do the following:
In a workbench perspective that offers the launch/debug/run action set (such as the Debug perspective), do one of the following:
- Select Run > Debug from the workbench menu bar to open the Debug launch configurations dialog box.
- Select the workbench toolbar Debug push button and choose Debug from the menu. This will open the Debug launch configurations dialog box.
In the Debug launch configurations dialog box, do one of the following:
- Select the Script Host Application node and click New.
- Right-click the Script Host Application node and select New from the pop-up menu.
- Double-click the Script Host Application node.
This will cause the launch configuration tabs and entry fields to display on the right-hand side of the dialog box. In the Name field, enter a name of your choice for the configuration that you are creating. Select the Main tab to bring it to the foreground. In the Main tab Project field, enter the name of the project that contains the source for the application that you wish to debug. If the project does not contain the source, import the source to the project.
Rather than enter a project name in the Project field, you can browse for the project by clicking Browse.
Enter the full path and name of the file that you wish to debug in the File field. Alternatively, you can browse for the program by clicking Browse. Completion of this field is mandatory. Select the Common tab to bring it to the foreground. You can do the following in the Common page:
- If you want the launch configuration to be stored locally and available for a single user, ensure that the Local radio button is selected. If the launch configuration is to be stored as a file in the workspace and shared in a repository for team use, select the Shared radio button and enter the project location where you wish the launch configuration to be stored in the Location of shared configuration field. Alternatively, you may browse for the project.
- If you would like the launch configuration to appear as a favorite debug configuration in the Debug push button favorites menu or the Debug menu Debug History list, select the Debug check box.
If all information mandatory to the launch configuration has been provided, the Debug and Apply push buttons will be enabled. Clicking Apply will save the launch configuration, at which point you can choose to close the dialog box without launching the debug session or you can click Debug to launch a debug session using the new launch configuration. If you click Debug, any changes to the launch configuration will be saved and a debug session will be launched.
After you have saved a debug launch configuration, you may edit it. For further information about editing debug launch configurations, see the related task below.
Note: If you have not yet saved launch configuration settings and if you have made entries in the launch configuration settings that you would like to remove or change, clicking Revert will remove all changes that you have made. If information mandatory to the launch configuration has not been provided or if there are errors in the information that you have provided, messages at the top of the dialog box will indicate what is missing. When you are finished working in the dialog box, click Close to exit it.
Related tasks
Preparing to debug
Setting debug preferences
Starting a debug session
Debugging an HTML Script Application
Debugging Web project script
Using the Debug view
Running an Active Script application
Stepping through a program
Halting a running program
Terminating a debug session
Starting a debug session with an existing launch configuration
Editing launch configurations
Removing launch configurations
Creating new launch configurations from existing launch configurations