idaholab / moose-language-support

MOOSE language support for VSCode
Other
5 stars 4 forks source link

No MOOSE application executable found. #12

Closed scottedmuller closed 1 year ago

scottedmuller commented 1 year ago

Hello, I just moved over to VSCode from Atom and very excited for the new features. However, after installing the MOOSE Language Support extension I haven't been able to get any of its features to work. When I attempt to use the autocomplete feature, I get the message "No MOOSE application executable found.", as shown here: image I'm not surprised by this issue as I remember linking an executable in Atom, but I didn't see any instructions related to this in the README file on MOOSE Language Support or in the instructions on the MOOSE website on setting up VSCode (https://mooseframework.inl.gov/help/development/VSCode.html). Being brand new to VSCode, maybe there's a step in the process that is supposed to obvious and I'm just missing it. For more context, I'm working from a Windows machine and running MOOSE with WSL. Please let me know what other steps must be taken to enable all the features for the MOOSE Language Support extension. Thanks, Scott

dschwen commented 1 year ago

I have not tested this with WSL, so this might be an actual bug. Can you tell me how you launch the editor and open the file? Is this using the "remote editing" feature for WSL? Where is your input located and where is the MOOSE executable that you expect to be used located?

scottedmuller commented 1 year ago

I just noticed that there is a closed issue addressing this. I installed the Remote Development extension, but I am still unsure where the path to my MOOSE executable needs to be specified. I tried copying it right to my Workspace in case it would automatically detect it, but no luck. The path to the executable I'm using is "\wsl$\Ubuntu-22.04\home\scotted\projects\moose\modules\phase_field\phase_field-opt". My input script is in a local folder away from the main wsl architecture, but it runs fine with MOOSE.

dschwen commented 1 year ago

First thing to test is if autocompletion works in the phase_field/examples folder. The plugin will always look for an executable in the same folder as the input file, or the parent folders (going up in the directory hierarchy until it finds an executable or fails).

If you are editing input files in a directory to the side of a moose dir then you should create a symbolic link to a viable executable into that directory e.g. ln -s ../../moose/modules/phase_field/phase_field-opt .

scottedmuller commented 1 year ago

Excellent suggestion. When I used VSCode to open a folder within the primary wsl architecture it gave me the option to open it within WSL: Ubuntu-22.04, e.g., \wsl$\Ubuntu-22.04\home\scotted\projects\moose\modules\phase_field or equivalently /home/scotted/projects/moose/modules/phase_field This doesn't happen, at least not by default, when opening folders in Windows proper with VSCode. When opened within WSL, VSCode needs to reinstall the extensions again, but this time it works like a charm without adding a special path to the extension options. I wonder if it's possible to open a folder outside the main WSL file system using VSCode's WSL: Ubuntu-22.04 (i.e., a folder located in /mnt/c/Users/...), which would be more convenient for other programs to locate in Windows. In any case, the problem is solved. Thank you very much for your help!