Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » XText Server Crashes with VS Code Extension, How to Debug?(XText Server Crashes with VS Code Extension, How to Debug?)
XText Server Crashes with VS Code Extension, How to Debug? [message #1796120] Fri, 05 October 2018 13:13 Go to next message
Mehmetcan Sinir is currently offline Mehmetcan SinirFriend
Messages: 55
Registered: September 2018
Member
Hi I built an existing Eclipse Plugin built with Xtext into a VS-Code Extension

I reused a lot of code (the complete DSL language + generators)

I used the following project setup:

https://blogs.itemis.com/en/integrating-xtext-language-support-in-visual-studio-code?success=true

When I start the VS-Code through
gradle startCode
, the language server is successfully generated and a new instance of VS Code opens.

However I get the following output from Xtext-Server:

Exception: com.google.inject.internal.util.$ComputationException thrown from the UncaughtExceptionHandler in thread "main"
[Info  - 3:12:26 PM] Connection to server got closed. Server will restart.


Now how can I debug my extension so that I will get to the source of this Problem?

Thank you
Re: XText Server Crashes with VS Code Extension, How to Debug? [message #1796123 is a reply to message #1796120] Fri, 05 October 2018 14:00 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14664
Registered: July 2009
Senior Member
I'd recommend you to write the extension in socket mode and start the server in socket mode from eclipse as debug
You can find a old example here
https://github.com/itemis/xtext-languageserver-example/blob/master/vscode-extension/src/extension.ts
And for starting
https://github.com/itemis/xtext-languageserver-example/blob/master/org.xtext.example.mydsl.ide/src/org/xtext/example/mydsl/ide/RunServer.java

Alternatively you can modify your launch script that is used in the client to start java with remote debugging and then connect with the normal remote debugging feature eclipse offers


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: XText Server Crashes with VS Code Extension, How to Debug? [message #1796125 is a reply to message #1796123] Fri, 05 October 2018 14:10 Go to previous messageGo to next message
Mehmetcan Sinir is currently offline Mehmetcan SinirFriend
Messages: 55
Registered: September 2018
Member
thanks I am doing that now
Re: XText Server Crashes with VS Code Extension, How to Debug? [message #1796203 is a reply to message #1796125] Mon, 08 October 2018 09:24 Go to previous messageGo to next message
Mehmetcan Sinir is currently offline Mehmetcan SinirFriend
Messages: 55
Registered: September 2018
Member
@Christian

I debugged it with the websocket. I am getting an error from google injector, that the implementation of a certain generator is not bound. However, it is bound in the RuntimeModule class.

Not sure how I can fix this problem

@Edit

Sorry now I know why I am getting the error, in any case, debugging with the websocket works!

[Updated on: Mon, 08 October 2018 09:38]

Report message to a moderator

Re: XText Server Crashes with VS Code Extension, How to Debug? [message #1796206 is a reply to message #1796203] Mon, 08 October 2018 10:16 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14664
Registered: July 2009
Senior Member
that is the complete error message?

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Class missing while executing xtext-maven:generate
Next Topic:Is it possible to write Grammar in more than one Xtext file?
Goto Forum:
  


Current Time: Tue Apr 16 09:30:05 GMT 2024

Powered by FUDForum. Page generated in 0.03475 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top