alefragnani / vscode-language-pascal

Pascal language extension for Visual Studio Code
MIT License
222 stars 47 forks source link

[BUG] - "The global command is not available. Make sure it is on PATH" Still getting this error even after Installing and Configuring GNU Global. #119

Closed futuremotiondev closed 2 years ago

futuremotiondev commented 2 years ago

Environment/version

Steps to reproduce

  1. Install and configure GNU Global according to this documentation.
  2. Open VS Code. You will get a popup saying The global command is not available. Make sure it is on PATH

Here is my %PATH% variable:

rundll32_SzUTmRgZRF

Everything is clearly set up properly, but for some reason I keep getting this message.

I really want Code Navigation to work. Can someone please help me?

Thanks, Jay

alefragnani commented 2 years ago

Hi @visusys ,

Those settings seems to be ok so far, except that you didn't provided prints of GTAGSCONF and GTAGSLABEL System Environment Variables, which should be something like:

* `GTAGSCONF`: `C:\gnu\glo653wb\share\gtags\gtags.conf` 
* `GTAGSLABEL`: `pygments`

Also, I just tested with Python 2.7, so I'm not sure 3.1 could be a problem, but let's validate your configs first:

  1. Open a Command Prompt window
  2. Navigate the to folder where your project is located
  3. Type python
  4. It should enter the python REPL. If yes, close it. If not, try reinstalling / reconfiguring it and try again
  5. Type gtags
  6. It should return with no error, and 3 new files non empty files should appear in the root folder (GPATH, GRTAGS, GTAGS)
  7. Type global
  8. It should display the global Usage help
  9. Type global -f ./somefile.pas where somefile.pas is the path to some of your pas files
  10. It should display the list of symbols (methods) on somefile.pas

If everything here works in Command Prompt window, the extension should work as well.

If the error remains, for some reason VS Code is not recognizing some of the tools (python, global or gtags). Then, I suggest you to:

  1. Open the same folder in VS Code
  2. Open Terminal
  3. Repeat the steps
  4. ...

It should work

Hope this helps

alefragnani commented 2 years ago

I'm closing this issue because no new comments has been added since my last question. Feel free to reopen/comment if the error still occurs.

Thanks for your understanding