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.

[TestProxy] Cannot locate recordings when debugging with VSCode

See original GitHub issue

When I run a test-proxy test via the terminal, it puts the recording in the correct place, regardless of my CWD and seemingly regardless of whether I have TEST_PROXY_FOLDER set. For example, if I run a search test, it correctly places the recording in:

{repoRoot}/sdk/search/azure-search-documents/tests/recordings/

However, because this fails on playback, I need to be able to debug into the process to figure out what is going wrong. However, when I run the test using the pytest testing extension for VSCode, test proxy places the recordings in the wrong location when live and cannot locate them on playback.

To make the debugger see the environment variables, I have to use a .env file. In it I specify both TEST_PROXY_FOLDER and AZURE_TEST_RUN_LIVE=true. While it picks up the “run live” signal, it places the recordings at the repo root, regardless of what I put in TEST_PROXY_FOLDER (it doesn’t seem to care about it at all).

{repoRoot}/tests/recordings/

However, when I switch AZURE_TEST_RUN_LIVE=false in the .env file, it tries to play back but I have no idea where it is looking for the recording but it can’t find it.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
tjprescottcommented, Jan 14, 2022

Cool, yes it now seems that the recording is placed in the right location and it does find it. While I run into other issues, at least this one can be closed!

1reaction
mccoypcommented, Jan 14, 2022

@tjprescott Now that #22508 has been merged, let me know if this issue persists. If you’re now able to load the recording files in debug mode, feel free to close this!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Debugging in Visual Studio Code
VS Code keeps debugging configuration information in a launch.json file located in a .vscode folder in your workspace (project root folder) or in...
Read more >
Write and debug code by using Hot Reload - Visual Studio ...
Write and debug running code with Hot Reload in Visual Studio (C#, ... to the previous location where you were in the app...
Read more >
Change log for 4.7.52
Exists() to find a host in the unmanaged state #130 · Bug 1868104: Make use of errors and ... Bug 1909289: Should be...
Read more >
Manual: Debug C# code in Unity
See Visual Studio Code's documentation to configure Visual Studio Code as ... This means that the Unity Editor or Player can't attach the...
Read more >
Release 4.7.0-fc.5 - Release Status
Exists() to find a host in the unmanaged state #130 · Bug 1868104: Make use of ... Bug 1920438: Fix openshift-tuned panic on...
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