Skip to content

Debugging the Language Server

Marcel Joss edited this page May 1, 2023 · 2 revisions

A SAMT language server started by the VS Code extension can be debugged by following these steps:

  1. Clone the samtkit/core repository and open it in IntelliJ IDEA

  2. Build the language server by running ./gradlew :language-server:assemble

  3. Clone the samtkit/vscode repository and open it in VS Code

  4. Start the extension with the "Run Extension" launch configuration

  5. Open Settings and set the SAMT server option to the path of the JAR you built in step 2 grafik

  6. Check that the language server has started in the Output panel grafik If the highlighted line is missing, check if TCP port 5005 is used by something else

  7. Start the "Language Server Debug" configuration in IntelliJ IDEA grafik

    Now your debug console should look like this: grafik Now, if you set a breakpoint in an endpoint method and trigger that action in VS Code the debugger should open

  8. If you changed the language server repeat step 2 and use the "SAMT: Restart SAMT Server" command via the command palette in VS Code grafik

Clone this wiki locally