question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Testing code lenses don't show for remote sessions to a directory symlink.

See original GitHub issue

Environment data

  • VS Code version: 1.38.1
  • Extension version: 2019.9.34911
  • OS and version: WSL (Windows 10.0.18362 Build 18362)
  • Python version: Conda 3.7.4
  • Type of virtual environment used: Conda
  • Relevant/affected Python packages and their versions: pytest-5.0.1

Expected behaviour

I am using python in a conda environment in WSL. I configured VS Code to use the correct WSL python interpreter, and I expected that the code adornments would be available.

Actual behaviour

VSCode discovers the test and it can be run , but there is no visible adornment.

WSL (no code adornments): image

Interestingly, I installed conda/python on Windows, and when I switch over to that interpreter in VS Code, the code adornments are available.

Windows (code adornments available) image

Steps to reproduce:

  1. Install pytest.
  2. Write a test
  3. Choose the WSL Conda python interpreter
  4. Code adornments not available. vs.
  5. Disconnect from WSL
  6. Choose the Windows Conda python interpreter
  7. Code adornments become available

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

> ~/miniconda3/envs/APT/bin/python ~/.vscode-server/extensions/ms-python.python-2019.9.34911/pythonFiles/testing_tools/run_adapter.py discover pytest -- -s .
cwd: ~/PhillipYen/Desktop/project1
> conda info --json
> ~/miniconda3/envs/APT/bin/python ~/.vscode-server/extensions/ms-python.python-2019.9.34911/pythonFiles/testing_tools/run_adapter.py discover pytest -- -s --cache-clear .
cwd: ~/PhillipYen/Desktop/project1

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
yphillipcommented, Sep 17, 2019

Hi Don,

To be more explicit, I do the following:

  1. Open Windows Terminal to start WSL,
  2. conda activate APT (to go into my the conda environment)
  3. cd to the project folder
  4. enter “code .” to start VSCode

I also have the Remote - WSL v0.39.5 Extension installed.

Is what you mean when you say open VSCode inside WSL?

Thanks, Phil

On Tue, Sep 17, 2019 at 12:35 PM Don Jayamanne notifications@github.com wrote:

Choose the WSL Conda python interpreter

Please note, if using wsl you’ll need to open VSCode inside wsl using the remote extension in VSCode. i.e.wsl is supported (by then python extension) only when VSCode is launched inside wsl using remote extensions.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/microsoft/vscode-python/issues/7443?email_source=notifications&email_token=AB4B6XWHNXPAMQGX3YFXV5LQKEWOVA5CNFSM4IXUGMY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD65U57A#issuecomment-532369148, or mute the thread https://github.com/notifications/unsubscribe-auth/AB4B6XS56E7NW2APUIFL2UTQKEWOVANCNFSM4IXUGMYQ .

0reactions
brettcannoncommented, Jul 29, 2021

In our upcoming test provider we won’t have codelenses, but there will be gutter icons which do work under e.g. WSL.

Read more comments on GitHub >

github_iconTop Results From Across the Web

User and Workspace Settings - Visual Studio Code
User settings - Apply globally to all VS Code instances. Remote settings - Apply to a remote machine opened by a user. Workspace...
Read more >
Understanding and Exploiting Symbolic links in Windows
One noticeable problem in exploiting these conditions is following: The program first create the directory/file and then try to write/delete it ...
Read more >
How to get the fully resolved path of a symbolic link in ...
This prints the absolute path to the file with all symbolic links resolved (i.e. it's equivalent to GNU readlink -f , not to...
Read more >
How do you get PHP, Symlinks and __FILE__ to work ...
Where symlink is a symbolic link to /trunk/.../plugins/ . Basically, this is because I need to test multiple WordPress installs and set them...
Read more >
Wyze cam website
8MM 110-degree wide angle lens for recording clear video in 1920x1080p ... One of the most important items revolves around how you check...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found