-
Notifications
You must be signed in to change notification settings - Fork 164
Debug unit test code lens fails with a cargo linking failure #887
Comments
Can you try adding it to |
It didn't help unfortunately. I've tried adding it to the project's I should add that it's a project running in a container on a remote machine, but everything else works fine. |
If I understand this correctly, you need that variable to be set for I normally set environment variables via $ cat /proc/self/environ | tr '\000' $'\n' | grep PATH I don't remember very well, but there's a local and a remote |
Definitely! I already have that configured and the build task by itself works perfectly fine. Here it is:
But the "Debug unit test" code lens seems to use other build task which is beyond my control. I'd expect the |
I've checked the rust-analyzer process running within the container via the Environment variables set in So the crucial question is: Where does rust-analyzer take the recipe to build from for the "Debug unit test" code lens? Is it automatically inferred based on |
@adaszko wait, I didn't even notice which repo this was in. Are you using the |
I'm on matklad's actually. I'm going to open an issue there. Thank you for your help @lnicola ! |
Hi! 👋
When I click the "Debug" code lens over a unit test, it fails with a linking error:
I actually know what the source of the problem is: The
PATH
environment variable needs to include the/opt/miniconda/bin
directory. The problem is, even when I put in theenv
section inlaunch.json
, it's seems like it's not being respected because it doesn't fix the problem:OTOH, if I build the code via this launch configuration:
there isn't any linking problem and the code builds fine. So I thought I could use the
preLaunchTask
inlaunch.json
:"preLaunchTask": "rust: cargo build",
but it also is being ignored and doesn't address the linking problem.
It looks like this is caused by #373 and #5.
Is this
env
andpreLaunchTask
config items handling simply not implemented yet?The text was updated successfully, but these errors were encountered: