paulo-fernando-silva / vscOctaveDebugger

MIT License
35 stars 4 forks source link

'octave-cli' is not recognized as an internal or external command #57

Closed mustaqimadha closed 2 years ago

mustaqimadha commented 2 years ago

I installed Octave 6.3.0 on my laptop which is running Windows 10. When I tried to debug my .m file, the sentence shown on the debug console.

image

What must I do to make octave-cli or octave-gui to be recognized as an internal or external command? Or what is the problem that I am facing? How to fix the problem?

paulo-fernando-silva commented 2 years ago

Is octave-cli in you PATH? You can check that by trying to run either octave-gui or octave-cli from the command line, i.e. cmd.exe If it's not in your PATH, then you can add it via the environment variables dialog.

Another possibility is to use the full path in the launch settings: "octave-cli": "c:/path/to/octave-cli.exe"

I guess it would be nice if the plugin downloaded octave directly? Maybe we could get it running out of the box.

mustaqimadha commented 2 years ago

I will be using octave to plot graphs, so I guess I need octave-gui instead of octave-cli. How to run the octave-gui from the command line? And how to add it via environment variables dialog?

I also can't find the location of octave-gui.exe in the installation directory. I clicked "Open file location" and it brought me to some applications that is not octave.

What do you mean by "the plugin downloaded octave directly" ? I downloaded octave, and VS Code (Octave debugger extension installed)

mustaqimadha commented 2 years ago

This is my PATH. I have added directory of octave-cli.exe. image

Then, the debug console shows the error message. image

paulo-fernando-silva commented 2 years ago

Since you have octave in the PATH you can set "octave": "octave-cli" and it should work. If not, try "octave": "octave-cli.exe" but I don't think it's needed.

Yes, octave-gui is better when working with UI stuff. If you're just plotting some graphs, then it shouldn't really matter. In that case octave-cli should be fine too. To search for octave-gui look under C:\Program Files\GNU Octave. It should be there somewhere. Use the explorer search functionality.

mustaqimadha commented 2 years ago

I tried to set the "octave": "octave-gui", searched for octave-gui in the directory given, and it works. image

The octave ran and graphs plotted successfully. image

Thank you for helping me to solve these issues.

paulo-fernando-silva commented 2 years ago

Great. Congratulations. I hope you find it useful. I'll close this issue. :)