Personal tools
You are here: Home Forum Use Using autcompletion with Visual studio code

Using autcompletion with Visual studio code

Up to Use

Using autcompletion with Visual studio code

Posted by s1291 at March 08. 2019

Is it possible to add autcompletion feature while writing Salome scripts in Visual Studio Code?
I tried to add
/home/s1291//Salome_9.2_UBUNTU1804/SALOME-9.2.0-UB18.04-SRC/BINARIES-UB18.04/KERNEL/lib/python3.5/site-packages/salome
to PYTHONPATH environment variable in ~/.bashrc file but there is no autocompletion!
Any idea?
Salome

:PHA+SXMgaXQgcG9zc2libGUgdG8gYWRkIDxnIGNsYXNzPSJncl8gZ3JfMzIgZ3ItYWxlcnQgZ3Jf c3BlbGwgZ3JfaW5saW5lX2NhcmRzIGdyX3J1bl9hbmltIENvbnRleHR1YWxTcGVsbGluZyBpbnMt ZGVsIG11bHRpUmVwbGFjZSIgaWQ9IjMyIiBkYXRhLWdyLWlkPSIzMiI+YXV0Y29tcGxldGlvbjwv Zz4gZmVhdHVyZSB3aGlsZSB3cml0aW5nIFNhbG9tZSBzY3JpcHRzIGluIFZpc3VhbCBTdHVkaW8g Q29kZT88L3A+PHA+SSB0cmllZCB0byBhZGQ8L3A+PHA+YC9ob21lL3MxMjkxLy9TYWxvbWVfOS4y X1VCVU5UVTE4MDQvU0FMT01FLTkuMi4wLVVCMTguMDQtU1JDL0JJTkFSSUVTLVVCMTguMDQvS0VS TkVML2xpYi9weXRob24zLjUvc2l0ZS1wYWNrYWdlcy9zYWxvbWVgIDxicj48L3A+PHA+dG8gYFBZ VEhPTlBBVEhgIGVudmlyb25tZW50IHZhcmlhYmxlIGluIGB+Ly5iYXNocmNgIGZpbGUgYnV0IHRo ZXJlIGlzIG5vIGF1dG9jb21wbGV0aW9uITwvcD48cD5BbnkgaWRlYT88L3A+PHA+IVtTYWxvbWVd KGh0dHBzOi8vaS5pbWd1ci5jb20vdUhEV014Qi5wbmcpPC9wPg==">‚Äč

Re: Using autcompletion with Visual studio code

Posted by Nabil Ghodbane at March 20. 2019

Hi,

you need to set the environment beforehand.

  • Linux:
    • run source ./env_launch.sh and start VS ( code)
  • Windows: 
    • start a VS dev terminal
    • in that terminal:
      • cd the installation folder 
      • type: call <SALOME installation folder>work\set_env.bat
      • type: call <SALOME installation folder>\products\env_launch.bat
      • start visual studio with devenv.exe
      • autocompletion should work

 

 

 

Attachments

Re: Using autcompletion with Visual studio code

Posted by s1291 at March 30. 2019

Thank you that works (by choosing python version used by salome 9.2: 3.5.1 inbVScode) 

thanemireth dear Nabil

Powered by Ploneboard
Document Actions