Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'Go to Definition' or F12 for .py AND .robot does not works (works only for .py OR .robot) #49

Open
pneomap opened this issue May 7, 2019 · 4 comments
Labels

Comments

@pneomap
Copy link

pneomap commented May 7, 2019

Describe the bug
'Go to Definition' (or F12) for python (.py) AND robot (.robot) keywords does not work.
Either 'Go Definition' works for python (.py)
Either 'Go Definition' works for robot keywords (.robot)

To Reproduce
I've installed
Visual Studio Code version 1.32.1
Robot Framework Intellisense 2.5.0

Steps to reproduce the behavior:

  1. Open .py file
  2. Open .robot file
  3. Set parameters in /home/user/.config/Code/User/settings.json
    "rfLanguageServer.includePaths": [
    "/*.robot",
    "
    /*.py"
    ]
  4. Click on 'Go to Definition' (or F12) for .py
  5. Click on 'Go to Definition' (or F12) for .robot

Expected behavior
Step 4. 'Go to Definition' (or F12) for .py is OK
AND
Step 5. 'Go to Definition' (or F12) for .robot is OK

ISSUE current behavior
Either F12 works for .py but issue with .robot
or F12 works for .robot but issue with .py

Environment (please complete the following information):

  • VSCode version: 1.32.1
  • Extension version: Robot Framework Intellisense 2.5.0
  • OS: Linux x64 4.4.136-4

Extension output:
Please include the extension output with debug logging turned on.

  1. Add setting "rfLanguageServer.logLevel": "debug"
  2. Select View -> Output -> Robot Framework Intellisense Server
  3. Reproduce the issue

Additional context
3. In /home/user/.config/Code/User/settings.json i also put
"rfLanguageServer.includePaths": [
"/*.robot",
]
or
"rfLanguageServer.includePaths": [
"
/*.py",
]

I have same issue.
Either F12 works for .py but issue with .robot
or F12 works for .robot but issue with .py

@pneomap pneomap added the bug label May 7, 2019
@pneomap
Copy link
Author

pneomap commented May 13, 2019

My collegues have the same issue. Could you support us ? Thanks in advance

@source-ram
Copy link

Having same issue.
For any python class based keywords, not autocompleting or showing definition is not working

Guessing, since the location of the python file is in dist location, this extension is not scanning the PYTHONPATH location for the py file, which is imported by the ROBOT ?

@tomi
Copy link
Owner

tomi commented Jul 12, 2019

I believe your configuration is incorrect. If you use pattern /*.py or /*.robot, it will only match files in your root directory (/). If you want to include all .py and .robot files in the workspace, you can use the **/*.robot pattern.

There is a limitation that the extension can only parse files (robot or python) that are in the current workspace. So if you have opened a directory /some/my/dir only files in /some/my/dir and its sub-directories can be parsed by the extension.

@lolotoms
Copy link

Hi,
So, if I want to use python seleniumLibrary installed locally, I need to import it on my vscode workspace? Is there a way to do that without install a python virtual env on my workspace (have a link from the workspace to my local python site-packages)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants