Depending on the type of IntelliJ-based IDE you have installed locally, run one of the following commands:
./gradlew runIde
for IntelliJ IDEA./gradlew runWebStorm
for WebStorm
This will start the corresponding sandbox IDEA instance with the plugin installed.
In order to use your local IDE settings (such as hotkeys or themes) with the sandbox IDE:
- Create a file local.properties next to gradle.properties.
- Write the following line to the file:
local.ideConfDir = /path/to/config/dir/e.g./WebStorm2024.2
From now on, settings (keymaps and various options) will be copied from the local configuration dir to that of the sandbox IDE on each run.
In local.properties, you can set a number of properties to be used by Gradle.
Note that keys should always start with local.
. Search in build.gradle for this prefix to find all known local
settings.
Any such properties are optional. Remove or comment out an existing entry to disable the corresponding feature.
To test and debug a local version of @sap/cds-lsp
in the plugin:
- In the local
cds-lsp
repo:- Make your code modifications.
- Run
npm run compile && npm pack
in the same directory.
- In this repo:
- To have the
lsp/node_modules/@sap/cds-lsp
folder cleaned on each build, thus enabling local development, setlocal.rmCdsLspNodeModules = true
- Reference the path of the output
.tgz
file in the@sap/cds-lsp
dependency inlsp/package.json
, with afile:
prefix. - Run
./gradlew runIde
(or./gradlew runWebStorm
) to start the sandbox IDE with the modified LSP server. Each run will use the newest version of the.tgz
file.
- To have the
When LSP debugging is enabled, the LSP server will start in debug mode, ready for a debugger to attach. The server is bundled but features a source map enabling you to set breakpoints in the TypeScript code.
The Internal Actions UI Submenu provides a set of tools to develop, debug, and test the plugin UI components. You may have to enable them in the installed IDE and/or the sandbox IDE.