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

Debugging unit tests is not working, but running tests is possible #22772

Closed
FrancaBa opened this issue Jan 22, 2024 · 6 comments
Closed

Debugging unit tests is not working, but running tests is possible #22772

FrancaBa opened this issue Jan 22, 2024 · 6 comments
Assignees
Labels
area-testing triage-needed Needs assignment to the proper sub-team
Milestone

Comments

@FrancaBa
Copy link

Type: Bug

Behaviour

Expected vs. Actual

I used to be able to debug tests through the python testing extension. Since end of November, I am not able to debug in vsc through this extension anymore. However, running tests in the extension is still possible. I get following error message:

Error[vscode-unittest]: RUN_TEST_IDS_PORT env var is not set.
Error: Could not connect to runTestIdsPort: [WinError 10049] The requested address is not valid in its context
Error: Could not connect to runTestIdsPort
Error[vscode-unittest]: TEST_PORT is not set.  TEST_UUID =  None
Error[vscode-unittest]: TEST_UUID is not set.  TEST_PORT =  45454
Plugin error connection error[vscode-pytest]: [WinError 10061] No connection could be made because the target machine actively refused it

Diagnostic data

  • Python version (& distribution if applicable, e.g. Anaconda): 3.11.4
  • Type of virtual environment used (e.g. conda, venv, virtualenv, etc.): Venv
  • Value of the python.languageServer setting: Default
Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

XXX

User Settings


languageServer: "Pylance"

testing
• pytestPath: "<placeholder>"
• unittestArgs: "<placeholder>"
• unittestEnabled: true

Extension version: 2023.20.0
VS Code version: Code 1.85.2 (8b3775030ed1a69b13e4f4c628c612102e30a681, 2024-01-18T06:40:10.514Z)
OS version: Windows_NT x64 10.0.22621
Modes:

System Info
Item Value
CPUs 12th Gen Intel(R) Core(TM) i7-1255U (12 x 2611)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 15.70GB (6.38GB free)
Process Argv --crash-reporter-id 2780f478-1a55-4f3c-a0c3-cf90bbd5aa10
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscoreces:30445986
vscod805cf:30301675
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:30899288
vscaat:30438848
vsclangdf:30486550
c4g48928:30535728
azure-dev_surveyone:30548225
0bi6i642:30933247
pythongtdpath:30769146
welcomedialog:30910333
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
pythontbext0:30879054
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
dsvsc019a:30933241

@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Jan 22, 2024
@eleanorjboyd
Copy link
Member

Hi! Seeing Error: Could not connect to runTestIdsPort: [WinError 10049] The requested address is not valid in its context in your logs which means we are having trouble connecting between sockets we create for test run. Did you override localhost? You can check by calling ping localhost on your machine and see if the default has changed. If so you should be able to fix it if you remove that override.

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Jan 22, 2024
@FrancaBa
Copy link
Author

FrancaBa commented Jan 23, 2024

Hi Eleanor,
I don't think that I overwrote localhost. When running ping localhost, I get the following output:

image

@github-actions github-actions bot removed the info-needed Issue requires more information from poster label Jan 23, 2024
@eleanorjboyd
Copy link
Member

@karthiknadig, do you have another suggestion here on how to test for this?

@github-actions github-actions bot added the info-needed Issue requires more information from poster label Jan 25, 2024
@karthiknadig
Copy link
Member

@eleanorjboyd When connecting from python we are using IPv4, the user has IPv6. We need to see how to support both scenarios.

Copy link

github-actions bot commented Jun 7, 2024

Because we have not heard back with the information we requested, we are closing this issue for now. If you are able to provide the info later on, then we will be happy to re-open this issue to pick up where we left off.

Happy Coding!

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 7, 2024
@eleanorjboyd eleanorjboyd reopened this Jun 7, 2024
@eleanorjboyd eleanorjboyd removed the info-needed Issue requires more information from poster label Jun 7, 2024
@eleanorjboyd
Copy link
Member

This should be resolved as we have switched to using named pipes, thanks!

@eleanorjboyd eleanorjboyd added this to the July 2024 milestone Jun 7, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-testing triage-needed Needs assignment to the proper sub-team
Projects
None yet
Development

No branches or pull requests

3 participants