Difference between revisions of "VMS IDE Developing"

From VSI OpenVMS Wiki
Jump to: navigation, search
openvms>Sergey.vorfolomeev
(Building VMS Project)
openvms>Sergey.vorfolomeev
(Building with Custom Procedure)
Line 46: Line 46:
 
   "command": "vmssoftware.synchronizer.buildProject",
 
   "command": "vmssoftware.synchronizer.buildProject",
 
   "extension": "vmssoftware.synchronizer",
 
   "extension": "vmssoftware.synchronizer",
   "parameter": "build.com",
+
   "parameter": "myDebug",
 
   "label": "Build Procedure",
 
   "label": "Build Procedure",
 
   "problemMatcher": []
 
   "problemMatcher": []
 
}</pre>
 
}</pre>
 
where:
 
where:
* '''parameter''' is the name of your build procedure (COM file)
+
* '''parameter''' is the name of predefined build configuration.
 
* '''label''' meaningful task name
 
* '''label''' meaningful task name
 
All other parameters must be as shown in example.
 
All other parameters must be as shown in example.

Revision as of 11:37, 28 May 2019

Loading Existing Project

If you start working on an existing project that resides on your OpenVMS machine, you need to download the source files to your local machine. Use the Synchronizer tool as described below to download the source files.

  1. Change the downloadNewFiles option to overwrite.
  2. Run the VMS-IDE: Synchronize project files with VMS command.
  3. After all project files are downloaded, change the downloadNewFiles option to skip or edit to prevent silent overwriting of local files.

Managing Project Source Files

You can view and edit all project files from the Visual Studio Code Explorer. Refer to Visual Studio Code documentation to learn more about Explorer view features.

The OpenVMS project structure may look like shown below:

VMS IDE Explorer

Managing the Project

You can manage your OpenVMS project from the Project Explorer view. To open the view, click Project Explorer icon on the Activity Bar.

Managing Dependencies

If you work on a complex project and you need to add dependencies, use the PROJET DEPENDENCIES section.
Assuming that you want to add "Project B" to "Project A" dependencies,

  1. Select "Project A" in the PROJET DEPENDENCIES panel.
  2. Right-click "Project B", and select Add to dependencies of selected item from the context menu.


To remove a project from dependencies

  1. Open the PROJET DEPENDENCIES section.
  2. Right-click the project, then select Remove from dependencies.

Building

Build MMS

Before building the project, create the MMS file by pressing F1 and running VMS-IDE: Create MMS.

Building VMS Project

To build a project in VMS IDE:

  1. Open the Project Explorer view.
  2. Select the project you want to build in the PROJECT DEPENDENCIES section.
  3. In the PROJECT DESCRIPTION section, choose the required build configuration by right-clicking the buildName parameter and selecting Change.
  4. Right-click the project and select Build with dependencies from the context menu.

If there are any changes to the project, the updated files will be uploaded to the OpenVMS system. Previously created object and listing files (.OBJ, .LIS) will be removed from the OpenVMS system. This guarantees that up-to-date files are uploaded to the OpenVMS system.

NOTE: you can manually upload all new and updated files by using the VMS-IDE: Upload all command.

Building with Custom Procedure

To build a project using a custom build procedure, edit the task.json file

{
  "type": "task2cmd",
  "command": "vmssoftware.synchronizer.buildProject",
  "extension": "vmssoftware.synchronizer",
  "parameter": "myDebug",
  "label": "Build Procedure",
  "problemMatcher": []
}

where:

  • parameter is the name of predefined build configuration.
  • label meaningful task name

All other parameters must be as shown in example.

NOTE: see Visual Studio Code documentation for more information on tasks.

Debugging

Use Debugger view to debug OpenVMS projects.

NOTE: Before running the debugger, make sure that you have actual DEBUG builds on the OpenVMS system.

To start a debugging session, press F5. If there is no "launch.json" file in the project directory, you will be asked to select the environment. Select VMS Debugger from the popup list. The launch.json file will be created and filled with the required information. There are two types of launch configuration - DEBUG and RUN.

"configurations": [
        {
            "type": "vms_dbg",
            "request": "launch",
            "name": "Debug",
            "program": "",
            "arguments": "",
            "stopOnEntry": true,
            "typeRun": "DEBUG"
        }
]

For the program field, specify the relative path to the executable, for example [.project.bin.release]hello.exe. If the field is empty, VMS IDE will try to fill it with data from the project settings.

To choose which configuration to use, go to "Debug" (Ctrl-Shift-D) and select the appropriate configuration from the drop-down list. Press F5 again to run debugger.