-
Notifications
You must be signed in to change notification settings - Fork 1
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
Visual Code Studio @Route error #4
Comments
Hi Stefano, thank you so much for finding this issue. I've installed VS Code myself and I think I know where the problem lies. The VS Code Java plugin mentions that it's using bits from the Eclipse platform and the BuildShip plugin in order to have support for Gradle. The problem is that BuildShip requires workarounds to work properly with Gradle; please see the following thread for more information: https://vaadin.com/forum/thread/18241436 The workaround is thus to manually add the |
Ok, I read the post and this seems the real reason. I tried a quick hack but it doesn't work but I will look more deeper in that direction and I let you know. Thank a lot for your help. Regards, |
Dear Mvysny, I have tried many different strategies but without any success. Your supposition is definitely right, I have added to the jvm startup configuration the option
in the Gradle one I have only:
unfortunately I don't have found any way to add the others Regards, |
I'm very sorry to hear that. Unfortunately I can't help you much since I'm not familiar with VS Code at all. As a workaround, could you please try downloading Intellij Community (it's free to download and use)? I know the project works properly in Intellij including debugging. Meanwhile I propose to leave this ticket opened; perhaps some fellow programmer using VS Code can eventually sort this out and post more information here. I will then update the README file accordingly 👍 Another thing to try could be to open a bug report for the BuildShip plugin, or upvote the existing issue if there is one already. |
Yes I will try. Don't worry I know is a VSC specific issue; anyway with Gradle I could launch the code and attach VSC to the running application so in some way I could work in some way. I will try to open the bug you suggest me. I really appreciated the time you spend for my problem. Regards, |
No problem 👍 best of luck! |
I have the solution !!!! If you put this snippet of code in the gradle build file:
the list of included class in the class path change
to:
and the project correctly start in debug mode and works on Visual Studio Code. The explanation of this change is related to the way Buildship, used by Eclipse and Visual Studo Code, handle the classpath. A good documentation is here as indicated by Donát Csikós: Improved Java project synchronization Anyway, now is possible to use Visual Studio Code with Jetty embedded managed by Gradle, which is exactly what I was looking to build. Regards, |
Excellent job finding the workaround! I'm sure it will help all Eclipse and VS Code users tremendously. Thank you so much 👍 |
Dear Mvysny,
as requested I am opening a new issue here.
I have downloaded your application and imported it in Visual Code Studio.
The only modification I did was to add the gradle eclipse plugin to gradle.build in order to let VCS to understand that is a java project.
Running the project with
./gradlew run
it work perfectly but running the project with the debug launching of VCS I have the route error.This is the basic configuration of the debug louncher:
The log in the terminal window are:
The supposition is that the debug launcher start the web application is some different way, unfortunately.
I know this is not a common scenario but I will really appreciate if you could point me in the direction of a solution.
Regards,
Stefano
P.S. if needed I could send the log in debug mode or the Jetty Dump configuration after the start.
The text was updated successfully, but these errors were encountered: