stef-levesque / vscode-perforce

Perforce basic commands for Visual Studio Code
MIT License
74 stars 103 forks source link

All command doesn't work #179

Open mickaelwang opened 4 years ago

mickaelwang commented 4 years ago

I install the extension and try to used it but it doesn't work. I get this issue all the time "The command not found". I work on Windows 10 x64 with VScode 1.40.2

It looks to me this extension try to run command line for perforce and all the command is "perforce.XXX" So I install the Helix command line client for windows (https://www.perforce.com/downloads/helix-command-line-client-p4) to have command line for Perfoce (because for now I have the Perforce Client)

And all the command line provide by this "Helix Command-Line Client" use command with p4 (documentation : https://www.perforce.com/manuals/cmdref/Content/CmdRef/Commands%20by%20Functional%20Area.html) and not perforce

Is it possible the issue I encounter is due to this command name ?

mjcrouch commented 4 years ago

perforce.xxx is the name of the command registered in vscode, not the name of the command line program. It does use p4 to execute them normally.

This would indicate that it's failed to register the commands properly with the vscode API. Do you see a "perforce log" in the "output" view dropdown?

(There is probably an exception logged somewhere in one of the other outputs, though I'm not at my pc and don't remember the details of where it would be. Possibly in the developer tools console if not there.. will try and get some more details as the owner of this project no longer seems to be active)

mjcrouch commented 4 years ago

Having just experienced this - I believe the behaviour is that the commands are not registered with vscode if there is no valid perforce client set up in the workspace. (there is a setting that I believe forces it to register the commands but it probably won't do anything useful anyway if it doesn't find a client by itself)

Can you try opening up the settings for the perforce extension, and ensuring that the settings "Client", "Port" and "User" are set to sensible values for your workspace. Restart vscode after changing these settings.

There are other ways of setting these values, but putting them explicitly in the settings should prove that it can work, and if it does work, you can experiment from there..