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

setup of VS-Code-Extension #153

Open
jakobjung10 opened this issue Mar 6, 2023 · 9 comments
Open

setup of VS-Code-Extension #153

jakobjung10 opened this issue Mar 6, 2023 · 9 comments
Labels
question Further information is requested

Comments

@jakobjung10
Copy link

jakobjung10 commented Mar 6, 2023

Hello everyone!

As i am new to the topic in general, i would be happy about getting support in order to get the VS-Code extension running.

My steps so far:

  • I have cloned the ghdl-language-server repository
  • I have installed npm and vsce

When executing the command vsce package, i get the following message:

PS C:\Users\Jakob\Documents\GitHub\ghdl-language-server> vsce package
ERROR Extension manifest not found: C:\Users\Jakob\Documents\GitHub\ghdl-language-server\package.json

The README-files from the ghdl and ghdl-language-server cause confusion for me.
Should the extension work out of the box or are there any previous steps required?
If yes, which steps have to be done?

My actual goal is to execute the extension in debug-mode.
(vsce package should not be necessary, as it just packages the extension, so the above listed steps might be a bit misleading for my actual goal)...
When i press F5 in VS-Code, nothing happens (i am expecting a new window to be launched with activated extension).

Thanks in advance for instructions to get the extension running!

@tgingold
Copy link
Member

tgingold commented Mar 6, 2023 via email

@jakobjung10
Copy link
Author

jakobjung10 commented Mar 6, 2023

I think you need to do: cd vscode-client before vsce package

PS C:\Users\Jakob\Documents\GitHub\ghdl-language-server\vscode-client> vsce package
ERROR You should not depend on 'vscode' in your 'dependencies'. Did you mean to add it to 'devDependencies'?

I haven't changed anything in the package.json file? Maybe it should be moved to devDependencies...
(i haven't done this so far to avoid any unnecessary trouble)

However, at the moment i am more interested in how to debug the extension (nothing happens, when i press F5...

@tgingold
Copy link
Member

tgingold commented Mar 6, 2023 via email

@jakobjung10
Copy link
Author

oh, you are right... (Below is a section of the code)

"engines": { "vscode": "^1.73.1" }, "devDependencies": { "@types/node": "^18.11.18", "@types/vscode": "^1.73.1", "ts-loader": "^9.4.2", "tslint": "^6.1.3", "typescript": "^4.9.5", "webpack": "^5.75.0", "webpack-cli": "^5.0.0" }, "dependencies": { "vscode": "^1.1.34", "vscode-languageclient": "^7.0.0" }

I didn't add it manually though... (i have removed it again)

Now, a file named vhdl-lsp-0.1.0-dev.vsix was created.
:)

What's the next step, as still nothing happens by pressing F5 ?

@tgingold
Copy link
Member

tgingold commented Mar 6, 2023 via email

@umarcor umarcor added the question Further information is requested label Mar 6, 2023
@jakobjung10
Copy link
Author

jakobjung10 commented Mar 6, 2023

code --install-extension vhdl-lsp-*.vsix

Okay, i executed the given command and in C:\Users\Jakob\.vscode\extensions, a folder named tgingold.vhdl-lsp-0.1.0-dev was created.

Now, i can see the extension in the extensions-menu in vscode.
When i activate the extension, i get the following message:
The VHDL Language Server server crashed 5 times in the last 3 minutes. The server will not be restarted.

Also, in the Output-Window in VS-Code, there are many errors mainly about libghdl.

At the moment, there are 2 questions from different perspectives

  • Perspective of an end-user
  • Perspective of a developer

End-user-experience

  • How can i solve this?

Developer-Experience

I am not sure what do you mean by debugging it. A long time ago, I read a webpage explaining how to debug a vscode extension.

  • Typically, before you package your extension, you would test your extension, debug, step through the extension when searching for errors etc... From other extensions i have experienced that you don't have to package the extension for testing purposes. You can start it in Debug mode, then a new vs-code window gets launched and you can test your extension. This is what i want to do.

@tgingold
Copy link
Member

tgingold commented Mar 6, 2023 via email

@jakobjung10
Copy link
Author

  • I have already installed pyGHDL via pip install pyghdl

  • Referring to downloading GHDL, i don't know what is the best way to installing it on windows.

Probably these websites should help me, but advice would be good

https://ghdl.github.io/ghdl/getting.html
https://ghdl.github.io/ghdl/development/building/index.html

  • I have already cloned the ghdl repo from github, but i also don't know exactly what you mean with ghdl-ls python tool. (Is it the folder pyGHDL? ) And how do i install the mentioned python tool?

  • **And in how far does it matter, where all the tools are installed so the VS-Code Extension can find them? **

@tgingold
Copy link
Member

tgingold commented Mar 7, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants