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

No delegateCommandHandler for vscode.java.startDebugSession when starting #1018

Closed
dsyer opened this issue Dec 20, 2019 · 17 comments
Closed
Assignees
Labels
language: java type: bug Something isn't working

Comments

@dsyer
Copy link

dsyer commented Dec 20, 2019

Describe the bug
No run links on Java source code. Running the project results in an error dialog "No delegateCommandHandler for vscode.java.startDebugSession". Apparently this would be fixed with a new version of https://github.com/microsoft/vscode-java-debug.

To Reproduce
Open any Java project, e.g. https://gitpod.io/#https://github.com/spring-projects/spring-petclinic

Expected behavior
Tests and main classes have"Run" links. Debug->Start Debugging should run the main class.

Additional Information
microsoft/vscode-java-debug#728

@akosyakov
Copy link
Member

@dsyer We will update Gitpod to latest java support. For time being you can upload latest version of extensions into your repo to enable them, see https://www.gitpod.io/docs/vscode-extensions/#installing-an-extension

@akosyakov akosyakov added type: bug Something isn't working language: java labels Dec 20, 2019
@akosyakov akosyakov self-assigned this Dec 20, 2019
@akosyakov
Copy link
Member

Duplicate of #886

@akosyakov akosyakov marked this as a duplicate of #886 Dec 20, 2019
@dsyer
Copy link
Author

dsyer commented Dec 20, 2019

Thanks for the link. Actually I’m not sure I know where to get a .vsix file from (also drag and drop is rubbish for anyone without a file explorer). Normally I just click on the “Install” button. Why can’t Gitpod do it the normal way? Where do you find those files?

@akosyakov
Copy link
Member

akosyakov commented Dec 20, 2019

@dsyer yes, it is not very convenient right now :( Unfortunately MS does not let us to access VS Code marketplace: https://www.gitpod.io/docs/vscode-extensions/#where-do-i-find-extensions We are working on the open marketplace which will be hosted under Eclipse Foundation:

@dsyer
Copy link
Author

dsyer commented Dec 20, 2019

Thanks. Found it. Unfortunately it doesn't seem to fix anything. How do I know if that extension is active?

@akosyakov
Copy link
Member

@dsyer It should be like that:
Screen Shot 2019-12-20 at 10 34 40

You need to reload the page to enabled latest versions. I've opened a bug in Theia to make it work automatically in the future: eclipse-theia/theia#6777

@dsyer
Copy link
Author

dsyer commented Dec 20, 2019

OK now I have this in .gitpod.yml:

vscode:
  extensions:
    - [email protected]:LRImBn//d5JhH4PUEI1BaQ==
    - [email protected]:3ARqL3kPh1J1SwpVjYUjqw==
    - [email protected]:BlvjRRJyZszeJzIS+xEHIA==

The first one is supposed to be a collection of extensions that include the rest, but using it on its own didn't seem to work at all.

I was able to run the app. But I get this on the tests:

Error: 'org.eclipse.jdt.core.IJavaProject org.eclipse.jdt.ls.core.internal.ProjectUtils.getJavaProject(java.lang.String)'.Error: 'org.eclipse.jdt.core.IJavaProject org.eclipse.jdt.ls.core.internal.ProjectUtils.getJavaProject(java.lang.String)'.Error: 'org.eclipse.jdt.core.IJavaProject org.eclipse.jdt.ls.core.internal.ProjectUtils.getJavaProject(java.lang.String)'.Error: 'org.eclipse.jdt.core.IJavaProject org.eclipse.jdt.ls.core.internal.ProjectUtils.getJavaProject(java.lang.String)'.Error: 'org.eclipse.jdt.core.IJavaProject org.eclipse.jdt.ls.core.internal.ProjectUtils.getJavaProject(java.lang.String)'.Error: 'org.eclipse.jdt.core.IJavaProject org.eclipse.jdt.ls.core.internal.ProjectUtils.getJavaProject(java.lang.String)'.

Nothing very helpful there.

@dsyer
Copy link
Author

dsyer commented Dec 20, 2019

Got it working almost:

vscode:
  extensions:
    - [email protected]:LRImBn//d5JhH4PUEI1BaQ==
    - [email protected]:3ARqL3kPh1J1SwpVjYUjqw==
    - [email protected]:BlvjRRJyZszeJzIS+xEHIA==
    - [email protected]:Q60n5quUtfd1EcwzkRq96A==
    - [email protected]:gdyOPlzH3PU5IkrigIg85g==

(Adding more extensions from the vscode-java-pack manually.)

The next thing that breaks is that when the tests run you don't get feedback about whether it was successful or not, just a placeholder (see screenshot).

Screenshot from 2019-12-20 09-45-12

Also, when you run the app there is no way to stop it (usually in vscode there is a little floating dialog with play/stop/refresh type buttons).

@akosyakov
Copy link
Member

@dsyer please replace .gitpod.yml with and reload:

vscode:
  extensions:
    - [email protected]:3ARqL3kPh1J1SwpVjYUjqw==
    - [email protected]:Q60n5quUtfd1EcwzkRq96A==
    - [email protected]:BlvjRRJyZszeJzIS+xEHIA==

I don't see that redhat.java is updated to latest in your gitpod.yml. The bug was in this extension. You should also see in the extension view that a version of redhat.java is correct.

For me app and test running work with such configuration:
Screen Shot 2019-12-20 at 10 48 24
Screen Shot 2019-12-20 at 10 49 37

@akosyakov
Copy link
Member

Also, when you run the app there is no way to stop it (usually in vscode there is a little floating dialog with play/stop/refresh type buttons).

In Theia, it is always docked in the debug view.

@akosyakov
Copy link
Member

akosyakov commented Dec 20, 2019

The next thing that breaks is that when the tests run you don't get feedback about whether it was successful or not, just a placeholder (see screenshot).

Could you elaborate on it? How does it look in VS Code? I see test in the test view, for instance:
Screen Shot 2019-12-20 at 10 52 18

@dsyer
Copy link
Author

dsyer commented Dec 20, 2019

In Theia, it is always docked in the debug view.

Got it thanks. Finding it hard to figure out how to force Gitpod to close and reopen the workspace. Is there an action for that?

I also found that I need the Maven extension, otherwise the run/debug links are not rendered.

Could you elaborate on it? How does it look in VS Code?

Your screenshot shows the $(check) placeholder on the test (should be a "tick" or "cross" to indicate success or failure).

@akosyakov
Copy link
Member

Finding it hard to figure out how to force Gitpod to close and reopen the workspace. Is there an action for that?

In the top right corner there is your account icon, if you click on it then you can stop the workspace or open the dashboard from there:
Screen Shot 2019-12-20 at 10 59 13

You can see all your workspaces here: https://gitpod.io/workspaces

Your screenshot shows the $(check) placeholder on the test (should be a "tick" or "cross" to indicate success or failure).

Thanks! I will bring it to Theia.

I also found that I need the Maven extension, otherwise the run/debug links are not rendered.

Do you mean code lens links?

@dsyer
Copy link
Author

dsyer commented Dec 20, 2019

Do you mean code lens links?

I guess. Is that what they call them?

@svenefftinge
Copy link
Member

Deployed to production. Please verify.

@dsyer
Copy link
Author

dsyer commented Feb 3, 2020

Nothing changed for me. What was it that was "deployed to production"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language: java type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants