Skip to main content



      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 09:13 Go to next message
Eclipse UserFriend
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 10:00 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: XText Server Crashes with VS Code Extension, How to Debug? [message #1796125 is a reply to message #1796123] Fri, 05 October 2018 10:10 Go to previous messageGo to next message
Eclipse UserFriend
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 05:24 Go to previous messageGo to next message
Eclipse UserFriend
@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 05:38] by Moderator

Re: XText Server Crashes with VS Code Extension, How to Debug? [message #1796206 is a reply to message #1796203] Mon, 08 October 2018 06:16 Go to previous message
Eclipse UserFriend
that is the complete error message?
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: Mon Jun 16 13:06:10 EDT 2025

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

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

Back to the top