-
Notifications
You must be signed in to change notification settings - Fork 0
Debugging the Language Server
A SAMT language server started by the VS Code extension can be debugged by following these steps:
-
Clone the samtkit/core repository and open it in IntelliJ IDEA
-
Build the language server by running
./gradlew :language-server:assemble
-
Clone the samtkit/vscode repository and open it in VS Code
-
Start the extension with the "Run Extension" launch configuration
-
Open Settings and set the SAMT server option to the path of the JAR you built in step 2
-
Check that the language server has started in the Output panel If the highlighted line is missing, check if TCP port 5005 is used by something else
-
Start the "Language Server Debug" configuration in IntelliJ IDEA
Now your debug console should look like this: Now, if you set a breakpoint in an endpoint method and trigger that action in VS Code the debugger should open
-
If you changed the language server repeat step 2 and use the "SAMT: Restart SAMT Server" command via the command palette in VS Code