Project commands: Codewind for VS Code

Create a new project or work with an existing project

  • To create a new project, right-click the Projects (Local) item and select Create New Project, or click on the + icon beside the Projects (Local) item. You can also create a new project using the Command Palette.
  • To work with an existing project, right-click the Projects (Local) item and select Add Existing Project. You can also add an existing project using the Command Palette.

Right-click a project in the Codewind view to see most project commands. All commands are available in the Command Palette.

Commands

  • Open app: Open the project application root endpoint in the system browser. The project must be in the Running or Debugging state, or the application server won’t be available.

  • Open Project Overview: Open an editor Tab that displays all of the Codewind information for the project. From this page, you can build, disable, or delete the project, and you can change the project auto build setting.

  • Open Container Shell: Open a shell, either bash or sh, in the project application container with docker exec. The project must have a container running. The VS Code integrated terminal needs access to your PATH environment variable so that it can run the docker command.

  • Open Application Monitor: Open the Codewind Application Monitor page for this project in the system browser.

  • Open Performance Dashboard: Opens the performance dashboard in the browser. This action is available only when the application is running or debugging.

  • Add Project to Workspace: Add this project’s folder on your local disk to your VS Code workspace.

  • Build: Manually request an application build for this project. If the project has auto build enabled, this command should not be necessary because builds are triggered automatically with a code change. This command is also available in the project overview page. This command is equivalent to clicking the Build button in the Codewind Overview page.

  • Toggle auto build: Enable or disable auto build for the project. This command is also available in the project overview.

  • Enable or disable project: Enable or disable the project. This command is also available in the project overview.

  • Remove project: Removes the project from Codewind. The project folder can optionally be deleted from disk after removal. This command is also available in the project overview.

Logs

  • Show all logs: Open a channel in the Output view for each of the project’s logs. To remove the output channel, use the Hide logs command.

  • Hide all logs: This command hides all the output channels that contain logs for this project.

  • Manage logs: This command presents a list of all logs for this project, which you can toggle individually.

Configuring project settings

Project settings tell Codewind more about the specifics of your project and can affect the status and/or behaviour of your application. Project settings can be configured from the Project Overview page that is accessible from a project’s context menu, or you can find the project settings in the .cw-settings file of the project which you can edit from the IDE. Changes to these fields are automatically picked up by the workspace.

The list of supported project settings are:

Context root

contextRoot: <string>

  • The value is used by Codewind to determine the project state
  • The value is also used as the initial endpoint when the Open Application action is used
  • If an incorrect context root is set, the project will be stuck in starting state
  • If the health check endpoint is set, the context root will not be used to determine the project state
  • If the value is not set, the default value is /

Health check endpoint

healthCheck: <string>

  • The value is used by Codewind to determine the project state
  • Expected to be used for the application health check endpoint
  • If a wrong health check endpoint is set, the project will be stuck in starting state
  • If the health check endpoint is set, the context root will not be used to determine the project state

HTTPS application

isHttps: <boolean>

  • This value tells Codewind to use the HTTPS protocol when Codewind detects the application status and also when Codewind launches the application in a browser.
  • If your application supports HTTPS, set isHttps to true, and Codewind uses HTTPS instead of HTTP to detect application status and to open browser URLs.
  • The default value of this setting is false.

Internal application port

internalPort: <string>

  • Expected to be exposed, Codewind will not expose the port automatically
  • This value is used by Codewind in conjunction with the context root to determine the project state
  • If an incorrect port is set, the project will be stuck in starting state

Internal debug port

internalDebugPort: <string>

  • Only applicable to Microprofile, Spring and Node.js projects
  • Only applicable to a local installation of Codewind
  • Can be assigned to a non-exposed port, and Codewind will help expose the port for you
  • If the project is already in debug mode, the project will need to be restarted in debug mode again in order to pick up the new debug port
  • If the project is in run mode, the new debug port will be picked up and used the next time a restart in debug mode is done

Paths to ignore for file changes

ignoredPaths: <string[]>

  • A list of file paths that indicate a build should be triggered on file change events in relation to the paths
  • Each item is expected to be a regex ("*/node_modules*" ) or a path relative to the project’s root directory ("/README.md")

Maven profiles

mavenProfiles: <string[]>

  • Only applicable to Microprofile and Spring projects
  • A list of profiles can be set if a project requires additional Maven profiles to be used when Codewind issues Maven commands
  • It is not advised to overwrite or remove the microclimate profile
  • Maven profiles can be used in conjunction with Maven properties

Maven properties

mavenProperties: <string[]>

  • Only for Microprofile and Spring projects
  • Maven properties can be entered in the form key=value
  • It is not advised to overwrite the microclimate property
  • Maven properties can be used in conjunction with Maven profiles

Next: Restart and debug

Back to the commands overview

Back to the VS Code tools overview

Troubleshooting