Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds small guide on how to start the LS in IntelliJ (to debug it) #253

Merged
merged 3 commits into from
Jun 3, 2024

Conversation

soerendomroes
Copy link
Contributor

As requested here, I added a small guide on how to use the proposed IntelliJ run configuration.

Copy link
Contributor

@edwardalee edwardalee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. One small question inserted.

docs/developer/developer-intellij-setup.mdx Show resolved Hide resolved
Copy link
Contributor

@cmnrd cmnrd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work with the standard VS Code extension installed, or do we need a modified one? I am wondering what happens if we start the external language server and the extension tries to start its internal one.

@soerendomroes
Copy link
Contributor Author

soerendomroes commented Apr 19, 2024

Does this work with the standard VS Code extension installed, or do we need a modified one? I am wondering what happens if we start the external language server and the extension tries to start its internal one.

Yes, as long as you start the run configuration to connect to the socket. This run configuration is for the internal language server and this run configuration is for an external one that is started on the socket 7670. The second one does however assume that the klighd-vscode extension is directly next to the vscode-lingua-franca repository. This is, however, not necessary and we be easily modified.

See lf-lang/vscode-lingua-franca#157

@soerendomroes
Copy link
Contributor Author

soerendomroes commented Apr 19, 2024

@cmnrd To clarify: If you start a language server on port 7670 and then run the first launch configuration that assumes that the language server is available as a jar in the specified directory, you would have a language server running on port 7670 that is not used by the started VS Code extension. So this first setup should only be used if one only edits the VS Code extension but does not plan to change or debug the server.

@cmnrd
Copy link
Contributor

cmnrd commented Apr 22, 2024

Should we add instructions on how to start the correct configuration for the code extension? Or is that already documented elsewhere? I don't know how to use the different launch configurations for VS Code, and it seems not obvious from the description added here. I think some additional information on the entire workflow, including how the VS Code extension talks to the language server that we are debugging, would be really helpful.

@soerendomroes
Copy link
Contributor Author

You can find some general information regarding the Klighd and klighd-vscode extension here, here, and here.

These include the general structure but not how launch configurations work (and I think that should be a link the general documentation). Currently, I tried to add a speaking name to the launch configurations. What specifically do you want to document regarding the launch configuration (or the debugging setup) and where?
As far as I know, I described it to Peter here and maybe somewhere else (but I cannot find it) and it seems to be documented here.

@cmnrd
Copy link
Contributor

cmnrd commented May 15, 2024

I was referring to this:

Per default it uses the port 7670. This port should be the same as the port specified by the vscode-lingua-franca extension in its launch configuration.

which I don't understand what it means. It would be nice to make the description self-contained so that someone, who does not know much about the specifics of the language server and the code extension (like me), has all the information required to actually start a debugging session. I think how to start the language server is well described, but how to interact with it from VS Code is unclear. The description in the extension CONTRIBUTING.md (which apparently is outdated regarding the IntelliJ setup) says 'Then start the extension using the "Launch VS Code Extension (Socket) LF" launch configuration'. But I also don't understand this sentence. How do I start this configuration and using which tool?

@soerendomroes
Copy link
Contributor Author

@cmnrd

How do I start this configuration and using which tool?

You start it in VS Code. I do not think that common UI of VS Code should be part of this guide.

VS Code Debug

@lhstrh lhstrh requested a review from petervdonovan May 31, 2024 19:04
@lhstrh lhstrh merged commit 833e36f into lf-lang:main Jun 3, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants