Skip to content

Move frame registration into a shared helper function

cb35dc2
Select commit
Loading
Failed to load commit list.
Merged

Fix evaluation of variables from chained exception frames #2018

Move frame registration into a shared helper function
cb35dc2
Select commit
Loading
Failed to load commit list.
Azure Pipelines / debugpy-test failed Apr 10, 2026 in 54m 54s

Build #20260410.1 had test failures

Details

Tests

  • Failed: 1 (0.00%)
  • Passed: 22,008 (82.56%)
  • Other: 4,647 (17.43%)
  • Total: 26,656

Annotations

Check failure on line 2787 in Build log

See this annotation in the file changed.

@azure-pipelines azure-pipelines / debugpy-test

Build log #L2787

PowerShell exited with code '1'.

Check failure on line 1 in test_thread_count[program-launch-1]

See this annotation in the file changed.

@azure-pipelines azure-pipelines / debugpy-test

test_thread_count[program-launch-1]

assert 2 == 1
 +  where 2 = len([{\n    "id": 1,\n    "name": "MainThread"\n}, {\n    "id": 2,\n    "name": "Dummy-6"\n}])
Raw output
pyfile = <function pyfile.<locals>.factory at 0x052E66E8>
target = <class 'tests.debug.targets.Program'>, run = launch, count = 1

    @pytest.mark.parametrize("count", [1, 3])
    def test_thread_count(pyfile, target, run, count):
        @pyfile
        def code_to_debug():
            import debuggee
            import threading
            import time
            import sys
    
            debuggee.setup()
            stop = False # noqa: F841
    
            def worker(tid, offset):
                i = 0
                global stop
                while not stop:
                    time.sleep(0.01)
                    i += 1
    
            threads = []
            if sys.argv[1] != "1":
                for i in [111, 222]:
                    thread = threading.Thread(target=worker, args=(i, len(threads)))
                    threads.append(thread)
                    thread.start()
            print("check here")  # @bp
            stop = True  # noqa: F841
    
        with debug.Session() as session:
            with run(session, target(code_to_debug, args=[str(count)])):
                session.set_breakpoints(code_to_debug, all)
    
            session.wait_for_stop()
            threads = session.request("threads")
>           assert len(threads["threads"]) == count
E           assert 2 == 1
E            +  where 2 = len([{\n    "id": 1,\n    "name": "MainThread"\n}, {\n    "id": 2,\n    "name": "Dummy-6"\n}])

tests\debugpy\test_threads.py:46: AssertionError