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

[debug]"add debug configuration" gives wrong suggestion in the first time #5804

Closed
kpge opened this issue Jul 26, 2019 · 15 comments
Closed

[debug]"add debug configuration" gives wrong suggestion in the first time #5804

kpge opened this issue Jul 26, 2019 · 15 comments
Labels
bug bugs found in the application debug issues that related to debug functionality help wanted issues meant to be picked up, require help json issues related to the json language

Comments

@kpge
Copy link
Contributor

kpge commented Jul 26, 2019

Description

the first time click 'Add Configuration' gives the wrong suggestion regardless the launch.json file is existed.
image

Reproduction Steps

  • close the launch.json file
  • refresh the browser
  • click Add Configuration in the debug widget

OS and Theia version:
theia:5c298024b5f5d705e6a53eaeb4660083350be91b
Diagnostics:

@akosyakov
Copy link
Member

in the example app? or you install some vscode extensions?

@akosyakov akosyakov added 🤔 needs more info issues that require more info from the author bug bugs found in the application debug issues that related to debug functionality labels Jul 26, 2019
@akosyakov akosyakov self-assigned this Jul 26, 2019
@kpge
Copy link
Contributor Author

kpge commented Jul 26, 2019

in the example app? or you install some vscode extensions?

I start theia in example app

@kpge
Copy link
Contributor Author

kpge commented Jul 26, 2019

It looks like that json language server had not been ready when the command editor.action.triggerSuggest is executed

@akosyakov
Copy link
Member

@kpge Do you want to investigate?

@akosyakov akosyakov removed their assignment Jul 26, 2019
@akosyakov akosyakov added help wanted issues meant to be picked up, require help and removed 🤔 needs more info issues that require more info from the author labels Jul 26, 2019
@akosyakov
Copy link
Member

It should be started whenever a workspace has json file: https://github.com/theia-ide/theia/blob/2befdf4cbebbbddb9719e0b88a578fba13f61808/packages/json/src/browser/json-client-contribution.ts#L82-L87

Maybe it just takes time or there is a bug and globs are never match.

@akosyakov akosyakov added the json issues related to the json language label Jul 26, 2019
@kpge
Copy link
Contributor Author

kpge commented Jul 26, 2019

It should be started whenever a workspace has json file:

https://github.com/theia-ide/theia/blob/2befdf4cbebbbddb9719e0b88a578fba13f61808/packages/json/src/browser/json-client-contribution.ts#L82-L87

Maybe it just takes time or there is a bug and globs are never match.

It won't be called until a json file is opened, I think there's a bug here.

@akosyakov
Copy link
Member

It won't be called until a json file is opened, I think there's a bug here.

It should be fine, some language servers are started only when file is opened.

I've noticed that you don't have syntax coloring. It means that is not an issues with a language server, but a language itself. An editor is opened before the language is registered and auto detects a language as plain text.

We fixed something like that for the plugin system: #5754 I think we need to generalize it for textmate grammar contributions.

@kpge
Copy link
Contributor Author

kpge commented Jul 28, 2019

The registerTextmateLanguage in JsonGrammarContribution will be called when the workspace is loaded, and when the json file is colored, it still shows the wrong suggestion.
image

@akosyakov
Copy link
Member

@kpge Could you try with #6145 please?

@kpge
Copy link
Contributor Author

kpge commented Sep 10, 2019

@kpge Could you try with #6145 please?

no,It still gives the same wrong suggestion.

@vince-fugnitto
Copy link
Member

@kpge I've tried recently and it works correctly for me, can you confirm?

image

@kpge
Copy link
Contributor Author

kpge commented Nov 15, 2019

@vince-fugnitto No, it still gives the wrong suggestion. Are you cloesed all the json file and refresh the page?
image

@vince-fugnitto vince-fugnitto changed the title [debug]"add debug confiuration" gives wrong suggestion in the first time [debug]"add debug configuration" gives wrong suggestion in the first time Dec 11, 2019
@vince-fugnitto
Copy link
Member

@vince-fugnitto No, it still gives the wrong suggestion. Are you cloesed all the json file and refresh the page?
image

Sorry for the late reply, I must have missed the notification.
I have retried recently and still cannot reproduce the issue. If you still experience the issue can you please provide the list of steps to reproduce and list of extensions included?

@kpge
Copy link
Contributor Author

kpge commented Dec 23, 2019

@vince-fugnitto sorry for the late reply too
I pulled the code and checked this issue, and found that this bug had been fixed, thanks

@kpge kpge closed this as completed Dec 23, 2019
@vince-fugnitto
Copy link
Member

@vince-fugnitto sorry for the late reply too
I pulled the code and checked this issue, and found that this bug had been fixed!

Great, and no worries! 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application debug issues that related to debug functionality help wanted issues meant to be picked up, require help json issues related to the json language
Projects
None yet
Development

No branches or pull requests

3 participants