diff --git a/.github/workflows/pr-check.yml b/.github/workflows/pr-check.yml index 9e8d20c6..c5dd2620 100644 --- a/.github/workflows/pr-check.yml +++ b/.github/workflows/pr-check.yml @@ -6,11 +6,11 @@ on: permissions: {} env: - NODE_VERSION: 18.17.1 + NODE_VERSION: 22.17.0 TEST_RESULTS_DIRECTORY: . # Force a path with spaces and unicode chars to test extension works in these scenarios - special-working-directory: './🐍 🐛' - special-working-directory-relative: '🐍 🐛' + special-working-directory: './testDir' + special-working-directory-relative: 'testDir' jobs: build-vsix: diff --git a/.github/workflows/push-check.yml b/.github/workflows/push-check.yml index 722446af..c8e956a9 100644 --- a/.github/workflows/push-check.yml +++ b/.github/workflows/push-check.yml @@ -11,11 +11,11 @@ on: permissions: {} env: - NODE_VERSION: 18.17.1 + NODE_VERSION: 22.17.0 TEST_RESULTS_DIRECTORY: . # Force a path with spaces and unicode chars to test extension works in these scenarios - special-working-directory: './🐍 🐛' - special-working-directory-relative: '🐍 🐛' + special-working-directory: './testDir' + special-working-directory-relative: 'testDir' jobs: build-vsix: diff --git a/build/azure-pipeline.pre-release.yml b/build/azure-pipeline.pre-release.yml index c97169d0..2db74326 100644 --- a/build/azure-pipeline.pre-release.yml +++ b/build/azure-pipeline.pre-release.yml @@ -58,7 +58,7 @@ extends: buildSteps: - task: NodeTool@0 inputs: - versionSpec: '18.17.1' + versionSpec: '22.17.0' displayName: Select Node version - task: UsePythonVersion@0 diff --git a/build/azure-pipeline.stable.yml b/build/azure-pipeline.stable.yml index 5a743734..452ab5e9 100644 --- a/build/azure-pipeline.stable.yml +++ b/build/azure-pipeline.stable.yml @@ -53,7 +53,7 @@ extends: buildSteps: - task: NodeTool@0 inputs: - versionSpec: '18.17.1' + versionSpec: '22.17.0' displayName: Select Node version - task: UsePythonVersion@0 diff --git a/debugpy_info.json b/debugpy_info.json index b24d7ed9..8a066e4d 100644 --- a/debugpy_info.json +++ b/debugpy_info.json @@ -1,69 +1,69 @@ { "macOS": [ { - "url": "https://files.pythonhosted.org/packages/3f/32/901c7204cceb3262fdf38f4c25c9a46372c11661e8490e9ea702bc4ff448/debugpy-1.8.13-cp310-cp310-macosx_14_0_x86_64.whl", + "url": "https://files.pythonhosted.org/packages/ce/fd/f1b75ebc61d90882595b81d808efd3573c082e1c3407850d9dccac4ae904/debugpy-1.8.16-cp310-cp310-macosx_14_0_x86_64.whl", "hash": { - "sha256": "06859f68e817966723ffe046b896b1bd75c665996a77313370336ee9e1de3e90" + "sha256": "2a3958fb9c2f40ed8ea48a0d34895b461de57a1f9862e7478716c35d76f56c65" } }, { - "url": "https://files.pythonhosted.org/packages/31/90/dd2fcad8364f0964f476537481985198ce6e879760281ad1cec289f1aa71/debugpy-1.8.13-cp311-cp311-macosx_14_0_universal2.whl", + "url": "https://files.pythonhosted.org/packages/63/d6/ad70ba8b49b23fa286fb21081cf732232cc19374af362051da9c7537ae52/debugpy-1.8.16-cp311-cp311-macosx_14_0_universal2.whl", "hash": { - "sha256": "eee02b2ed52a563126c97bf04194af48f2fe1f68bb522a312b05935798e922ff" + "sha256": "67371b28b79a6a12bcc027d94a06158f2fde223e35b5c4e0783b6f9d3b39274a" } }, { - "url": "https://files.pythonhosted.org/packages/79/ad/dff929b6b5403feaab0af0e5bb460fd723f9c62538b718a9af819b8fff20/debugpy-1.8.13-cp312-cp312-macosx_14_0_universal2.whl", + "url": "https://files.pythonhosted.org/packages/61/fb/0387c0e108d842c902801bc65ccc53e5b91d8c169702a9bbf4f7efcedf0c/debugpy-1.8.16-cp312-cp312-macosx_14_0_universal2.whl", "hash": { - "sha256": "2b8de94c5c78aa0d0ed79023eb27c7c56a64c68217d881bee2ffbcb13951d0c1" + "sha256": "b202e2843e32e80b3b584bcebfe0e65e0392920dc70df11b2bfe1afcb7a085e4" } } ], "win64": [ { - "url": "https://files.pythonhosted.org/packages/89/16/1d53a80caf5862627d3eaffb217d4079d7e4a1df6729a2d5153733661efd/debugpy-1.8.13-cp310-cp310-win_amd64.whl", + "url": "https://files.pythonhosted.org/packages/54/f8/e774ad16a60b9913213dbabb7472074c5a7b0d84f07c1f383040a9690057/debugpy-1.8.16-cp310-cp310-win_amd64.whl", "hash": { - "sha256": "dc7b77f5d32674686a5f06955e4b18c0e41fb5a605f5b33cf225790f114cfeec" + "sha256": "fee6db83ea5c978baf042440cfe29695e1a5d48a30147abf4c3be87513609817" } }, { - "url": "https://files.pythonhosted.org/packages/cd/d5/3684d7561c8ba2797305cf8259619acccb8d6ebe2117bb33a6897c235eee/debugpy-1.8.13-cp311-cp311-win_amd64.whl", + "url": "https://files.pythonhosted.org/packages/d8/ef/9aa9549ce1e10cea696d980292e71672a91ee4a6a691ce5f8629e8f48c49/debugpy-1.8.16-cp311-cp311-win_amd64.whl", "hash": { - "sha256": "62f9b4a861c256f37e163ada8cf5a81f4c8d5148fc17ee31fb46813bd658cdcc" + "sha256": "70f5fcd6d4d0c150a878d2aa37391c52de788c3dc680b97bdb5e529cb80df87a" } }, { - "url": "https://files.pythonhosted.org/packages/c9/f7/0df18a4f530ed3cc06f0060f548efe9e3316102101e311739d906f5650be/debugpy-1.8.13-cp312-cp312-win_amd64.whl", + "url": "https://files.pythonhosted.org/packages/b1/e0/bc62e2dc141de53bd03e2c7cb9d7011de2e65e8bdcdaa26703e4d28656ba/debugpy-1.8.16-cp312-cp312-win_amd64.whl", "hash": { - "sha256": "63ca7670563c320503fea26ac688988d9d6b9c6a12abc8a8cf2e7dd8e5f6b6ea" + "sha256": "75f204684581e9ef3dc2f67687c3c8c183fde2d6675ab131d94084baf8084121" } } ], "linux": [ { - "url": "https://files.pythonhosted.org/packages/95/10/77fe746851c8d84838a807da60c7bd0ac8627a6107d6917dd3293bf8628c/debugpy-1.8.13-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", + "url": "https://files.pythonhosted.org/packages/df/5e/c5c1934352871128b30a1a144a58b5baa546e1b57bd47dbed788bad4431c/debugpy-1.8.16-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", "hash": { - "sha256": "cb56c2db69fb8df3168bc857d7b7d2494fed295dfdbde9a45f27b4b152f37520" + "sha256": "e5ca7314042e8a614cc2574cd71f6ccd7e13a9708ce3c6d8436959eae56f2378" } }, { - "url": "https://files.pythonhosted.org/packages/5c/c9/06ff65f15eb30dbdafd45d1575770b842ce3869ad5580a77f4e5590f1be7/debugpy-1.8.13-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", + "url": "https://files.pythonhosted.org/packages/aa/49/7b03e88dea9759a4c7910143f87f92beb494daaae25560184ff4ae883f9e/debugpy-1.8.16-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", "hash": { - "sha256": "4caca674206e97c85c034c1efab4483f33971d4e02e73081265ecb612af65377" + "sha256": "b2abae6dd02523bec2dee16bd6b0781cccb53fd4995e5c71cc659b5f45581898" } }, { - "url": "https://files.pythonhosted.org/packages/d6/4f/b7d42e6679f0bb525888c278b0c0d2b6dff26ed42795230bb46eaae4f9b3/debugpy-1.8.13-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", + "url": "https://files.pythonhosted.org/packages/37/44/19e02745cae22bf96440141f94e15a69a1afaa3a64ddfc38004668fcdebf/debugpy-1.8.16-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", "hash": { - "sha256": "887d54276cefbe7290a754424b077e41efa405a3e07122d8897de54709dbe522" + "sha256": "64473c4a306ba11a99fe0bb14622ba4fbd943eb004847d9b69b107bde45aa9ea" } } ], "any": [ { - "url": "https://files.pythonhosted.org/packages/37/4f/0b65410a08b6452bfd3f7ed6f3610f1a31fb127f46836e82d31797065dcb/debugpy-1.8.13-py2.py3-none-any.whl", + "url": "https://files.pythonhosted.org/packages/52/57/ecc9ae29fa5b2d90107cd1d9bf8ed19aacb74b2264d986ae9d44fe9bdf87/debugpy-1.8.16-py2.py3-none-any.whl", "hash": { - "sha256": "d4ba115cdd0e3a70942bd562adba9ec8c651fe69ddde2298a1be296fc331906f" + "sha256": "19c9521962475b87da6f673514f7fd610328757ec993bf7ec0d8c96f9a325f9e" } } ] diff --git a/package-lock.json b/package-lock.json index cc4ca09a..4fc91fe0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "debugpy", - "version": "2025.12.0", + "version": "2025.13.0-dev", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "debugpy", - "version": "2025.12.0", + "version": "2025.13.0-dev", "license": "MIT", "dependencies": { "@vscode/debugadapter": "^1.65.0", @@ -692,22 +692,28 @@ "dev": true }, "node_modules/@types/mocha": { - "version": "10.0.7", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.7.tgz", - "integrity": "sha512-GN8yJ1mNTcFcah/wKEFIJckJx9iJLoMSzWcfRRuxz/Jk+U6KQNnml+etbtxFK8lPjzOw3zp4Ha/kjSst9fsHYw==", - "dev": true + "version": "10.0.10", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.10.tgz", + "integrity": "sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==", + "dev": true, + "license": "MIT" }, "node_modules/@types/node": { - "version": "18.18.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.3.tgz", - "integrity": "sha512-0OVfGupTl3NBFr8+iXpfZ8NR7jfFO+P1Q+IO/q0wbo02wYkP5gy36phojeYWpLQ6WAMjl+VfmqUk2YbUfp0irA==", - "dev": true + "version": "18.19.124", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.124.tgz", + "integrity": "sha512-hY4YWZFLs3ku6D2Gqo3RchTd9VRCcrjqp/I0mmohYeUVA5Y8eCXKJEasHxLAJVZRJuQogfd1GiJ9lgogBgKeuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~5.26.4" + } }, "node_modules/@types/semver": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", - "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==", - "dev": true + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-FmgJfu+MOcQ370SD0ev7EI8TlCAfKYU+B4m5T3yXc1CiRN94g/SZPtsCkk506aUDtlMnFZvasDwHHUcZUEaYuA==", + "dev": true, + "license": "MIT" }, "node_modules/@types/shimmer": { "version": "1.2.0", @@ -996,12 +1002,13 @@ "integrity": "sha512-gNw9z9LbqLV+WadZ6/MMrWwO3e0LuoUH1wve/1iPsBNbgqeVCiB0EZFNNj2lysxS2gkqoF9hmyVaG3MoM1BkxA==" }, "node_modules/@vscode/python-extension": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@vscode/python-extension/-/python-extension-1.0.5.tgz", - "integrity": "sha512-uYhXUrL/gn92mfqhjAwH2+yGOpjloBxj9ekoL4BhUsKcyJMpEg6WlNf3S3si+5x9zlbHHe7FYQNjZEbz1ymI9Q==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@vscode/python-extension/-/python-extension-1.0.6.tgz", + "integrity": "sha512-q7KYf+mymM67G0yS6xfhczFwu2teBi5oXHVdNgtCsYhErdSOkwMPtE291SqQahrjTcgKxn7O56i1qb1EQR6o4w==", + "license": "MIT", "engines": { - "node": ">=16.17.1", - "vscode": "^1.78.0" + "node": ">=22.17.0", + "vscode": "^1.93.0" } }, "node_modules/@vscode/test-electron": { @@ -1241,6 +1248,7 @@ "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.1.1.tgz", "integrity": "sha512-wy0mglZpDSiSS0XHrVR+BAdId2+yxPSoJW8fsna3ZpYSlufjvxnP4YbKTCBZnNIcGN4r6ZPXV55X4mYExOfLmw==", "dev": true, + "license": "MIT", "engines": { "node": ">=14.15.0" }, @@ -1254,6 +1262,7 @@ "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.2.tgz", "integrity": "sha512-zLHQdI/Qs1UyT5UBdWNqsARasIA+AaF8t+4u2aS2nEpBQh2mWIVb8qAklq0eUENnC5mOItrIB4LiS9xMtph18A==", "dev": true, + "license": "MIT", "engines": { "node": ">=14.15.0" }, @@ -1267,6 +1276,7 @@ "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.5.tgz", "integrity": "sha512-lqaoKnRYBdo1UgDX8uF24AfGMifWK19TxPmM5FHc2vAGxrJ/qtyUyFBWoY1tISZdelsQ5fBcOusifo5o5wSJxQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=14.15.0" }, @@ -2348,10 +2358,11 @@ } }, "node_modules/envinfo": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.9.0.tgz", - "integrity": "sha512-RODB4txU+xImYDemN5DqaKC0CHk05XSVkOX4pq0hK26Qx+1LChkuOyUDlGEjYb3ACr0n9qBhFjg37hQuJvpkRQ==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.14.0.tgz", + "integrity": "sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg==", "dev": true, + "license": "MIT", "bin": { "envinfo": "dist/cli.js" }, @@ -3350,6 +3361,7 @@ "resolved": "https://registry.npmjs.org/interpret/-/interpret-3.1.1.tgz", "integrity": "sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=10.13.0" } @@ -4628,6 +4640,7 @@ "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.8.0.tgz", "integrity": "sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==", "dev": true, + "license": "MIT", "dependencies": { "resolve": "^1.20.0" }, @@ -5472,6 +5485,13 @@ "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", "dev": true }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true, + "license": "MIT" + }, "node_modules/universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", @@ -5670,6 +5690,7 @@ "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-5.1.4.tgz", "integrity": "sha512-pIDJHIEI9LR0yxHXQ+Qh95k2EvXpWzZ5l+d+jIo+RdSm9MiHfzazIxwwni/p7+x4eJZuvG1AJwgC4TNQ7NRgsg==", "dev": true, + "license": "MIT", "dependencies": { "@discoveryjs/json-ext": "^0.5.0", "@webpack-cli/configtest": "^2.1.1", @@ -5715,6 +5736,7 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", "dev": true, + "license": "MIT", "engines": { "node": ">=14" } @@ -6446,21 +6468,24 @@ "dev": true }, "@types/mocha": { - "version": "10.0.7", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.7.tgz", - "integrity": "sha512-GN8yJ1mNTcFcah/wKEFIJckJx9iJLoMSzWcfRRuxz/Jk+U6KQNnml+etbtxFK8lPjzOw3zp4Ha/kjSst9fsHYw==", + "version": "10.0.10", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.10.tgz", + "integrity": "sha512-xPyYSz1cMPnJQhl0CLMH68j3gprKZaTjG3s5Vi+fDgx+uhG9NOXwbVt52eFS8ECyXhyKcjDLCBEqBExKuiZb7Q==", "dev": true }, "@types/node": { - "version": "18.18.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.3.tgz", - "integrity": "sha512-0OVfGupTl3NBFr8+iXpfZ8NR7jfFO+P1Q+IO/q0wbo02wYkP5gy36phojeYWpLQ6WAMjl+VfmqUk2YbUfp0irA==", - "dev": true + "version": "18.19.124", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.124.tgz", + "integrity": "sha512-hY4YWZFLs3ku6D2Gqo3RchTd9VRCcrjqp/I0mmohYeUVA5Y8eCXKJEasHxLAJVZRJuQogfd1GiJ9lgogBgKeuQ==", + "dev": true, + "requires": { + "undici-types": "~5.26.4" + } }, "@types/semver": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", - "integrity": "sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==", + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-FmgJfu+MOcQ370SD0ev7EI8TlCAfKYU+B4m5T3yXc1CiRN94g/SZPtsCkk506aUDtlMnFZvasDwHHUcZUEaYuA==", "dev": true }, "@types/shimmer": { @@ -6654,9 +6679,9 @@ } }, "@vscode/python-extension": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@vscode/python-extension/-/python-extension-1.0.5.tgz", - "integrity": "sha512-uYhXUrL/gn92mfqhjAwH2+yGOpjloBxj9ekoL4BhUsKcyJMpEg6WlNf3S3si+5x9zlbHHe7FYQNjZEbz1ymI9Q==" + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/@vscode/python-extension/-/python-extension-1.0.6.tgz", + "integrity": "sha512-q7KYf+mymM67G0yS6xfhczFwu2teBi5oXHVdNgtCsYhErdSOkwMPtE291SqQahrjTcgKxn7O56i1qb1EQR6o4w==" }, "@vscode/test-electron": { "version": "2.3.9", @@ -7651,9 +7676,9 @@ "dev": true }, "envinfo": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.9.0.tgz", - "integrity": "sha512-RODB4txU+xImYDemN5DqaKC0CHk05XSVkOX4pq0hK26Qx+1LChkuOyUDlGEjYb3ACr0n9qBhFjg37hQuJvpkRQ==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.14.0.tgz", + "integrity": "sha512-CO40UI41xDQzhLB1hWyqUKgFhs250pNcGbyGKe1l/e4FSaI/+YE4IMG76GDt0In67WLPACIITC+sOi08x4wIvg==", "dev": true }, "es-define-property": { @@ -9957,6 +9982,12 @@ "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", "dev": true }, + "undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, "universalify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz", diff --git a/package.json b/package.json index 60aac993..cb361835 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "debugpy", "displayName": "Python Debugger", "description": "Python Debugger extension using debugpy.", - "version": "2025.12.0", + "version": "2025.13.0-dev", "publisher": "ms-python", "enabledApiProposals": [ "portsAttributes", diff --git a/src/extension/common/python.ts b/src/extension/common/python.ts index a82fb559..18686d1f 100644 --- a/src/extension/common/python.ts +++ b/src/extension/common/python.ts @@ -2,7 +2,13 @@ // Licensed under the MIT License. /* eslint-disable @typescript-eslint/naming-convention */ -import { Environment, EnvironmentPath, PythonExtension, Resource } from '@vscode/python-extension'; +import { + ActiveEnvironmentPathChangeEvent, + Environment, + EnvironmentPath, + PythonExtension, + Resource, +} from '@vscode/python-extension'; import { commands, EventEmitter, extensions, Uri, Event, Disposable } from 'vscode'; import { createDeferred } from './utils/async'; import { traceError, traceLog } from './log/logging'; @@ -22,12 +28,24 @@ export interface IInterpreterDetails { const onDidChangePythonInterpreterEvent = new EventEmitter(); export const onDidChangePythonInterpreter: Event = onDidChangePythonInterpreterEvent.event; async function activateExtension() { + console.log('Activating Python extension...'); + activateEnvsExtension(); const extension = extensions.getExtension('ms-python.python'); if (extension) { if (!extension.isActive) { await extension.activate(); } } + console.log('Python extension activated.'); + return extension; +} +async function activateEnvsExtension() { + const extension = extensions.getExtension('ms-python.vscode-python-envs'); + if (extension) { + if (!extension.isActive) { + await extension.activate(); + } + } return extension; } @@ -48,8 +66,16 @@ export async function initializePython(disposables: Disposable[]): Promise if (api) { disposables.push( - api.environments.onDidChangeActiveEnvironmentPath((e) => { - onDidChangePythonInterpreterEvent.fire({ path: [e.path], resource: e.resource?.uri }); + api.environments.onDidChangeActiveEnvironmentPath((e: ActiveEnvironmentPathChangeEvent) => { + let resourceUri: Uri | undefined; + if (e.resource instanceof Uri) { + resourceUri = e.resource; + } + if (e.resource && 'uri' in e.resource) { + // WorkspaceFolder type + resourceUri = e.resource.uri; + } + onDidChangePythonInterpreterEvent.fire({ path: [e.path], resource: resourceUri }); }), ); @@ -89,8 +115,13 @@ export async function getActiveEnvironmentPath(resource?: Resource) { export async function getInterpreterDetails(resource?: Uri): Promise { const api = await getPythonExtensionEnviromentAPI(); const environment = await api.environments.resolveEnvironment(api.environments.getActiveEnvironmentPath(resource)); - if (environment?.executable.uri) { - return { path: [environment?.executable.uri.fsPath], resource }; + const rawExecPath = environment?.executable.uri?.fsPath; + if (rawExecPath) { + let execPath = rawExecPath; + if (rawExecPath.includes(' ') && !(rawExecPath.startsWith('"') && rawExecPath.endsWith('"'))) { + execPath = `"${rawExecPath}"`; + } + return { path: [execPath], resource }; } return { path: undefined, resource }; } diff --git a/src/test/constants.ts b/src/test/constants.ts index 5e1fd83b..b2d00e85 100644 --- a/src/test/constants.ts +++ b/src/test/constants.ts @@ -33,6 +33,8 @@ function isMultiRootTest() { export const EXTENSION_ROOT_DIR_FOR_TESTS = path.join(__dirname, '..', '..'); export const PVSC_EXTENSION_ID_FOR_TESTS = 'ms-python.python'; +export const PVSC_ENVS_EXTENSION_ID_FOR_TESTS = 'ms-python.vscode-python-envs'; + export const SMOKE_TEST_EXTENSIONS_DIR = path.join( EXTENSION_ROOT_DIR_FOR_TESTS, 'tmp', diff --git a/src/test/runTest.ts b/src/test/runTest.ts index 4122198f..464e0042 100644 --- a/src/test/runTest.ts +++ b/src/test/runTest.ts @@ -2,8 +2,7 @@ import * as cp from 'child_process'; import * as path from 'path'; import { downloadAndUnzipVSCode, resolveCliArgsFromVSCodeExecutablePath, runTests } from '@vscode/test-electron'; -import { PVSC_EXTENSION_ID_FOR_TESTS } from './constants'; -import { OSType, getOSType } from '../extension/common/platform'; +import { PVSC_ENVS_EXTENSION_ID_FOR_TESTS, PVSC_EXTENSION_ID_FOR_TESTS } from './constants'; async function main() { try { @@ -18,19 +17,49 @@ async function main() { const [cliPath, ...args] = resolveCliArgsFromVSCodeExecutablePath(vscodeExecutablePath); // Use cp.spawn / cp.exec for custom setup - if (getOSType() === OSType.Windows) { - const exec = path.basename(cliPath); - cp.spawnSync(exec, [...args, '--install-extension', PVSC_EXTENSION_ID_FOR_TESTS], { - cwd: path.dirname(cliPath), - encoding: 'utf-8', - stdio: 'inherit', - }); + const isWin = process.platform === 'win32'; + if (isWin) { + try { + const installResult = cp.spawnSync( + cliPath, + [...args, '--install-extension', PVSC_EXTENSION_ID_FOR_TESTS, PVSC_ENVS_EXTENSION_ID_FOR_TESTS], + { + cwd: path.dirname(cliPath), + encoding: 'utf8', + stdio: 'inherit', + shell: true, + }, + ); + if (installResult.error) { + console.error('Extension installation error:', installResult.error); + } + if (installResult.status !== 0) { + console.error(`Extension installation failed with exit code: ${installResult.status}`); + } else { + console.log('Extension installation succeeded.'); + } + } catch (ex) { + console.error('Exception during extension installation:', ex); + } } else { - cp.spawnSync(cliPath, [...args, '--install-extension', PVSC_EXTENSION_ID_FOR_TESTS], { - encoding: 'utf-8', - stdio: 'inherit', - }); + const installResult = cp.spawnSync( + cliPath, + [...args, '--install-extension', PVSC_EXTENSION_ID_FOR_TESTS, PVSC_ENVS_EXTENSION_ID_FOR_TESTS], + { + encoding: 'utf8', + stdio: 'inherit', + }, + ); + if (installResult.error) { + console.error('Extension installation error:', installResult.error); + } + if (installResult.status !== 0) { + console.error(`Extension installation failed with exit code: ${installResult.status}`); + } else { + console.log('Extension installation succeeded.'); + } } + console.log('Extensions installed, ready to run tests.'); // Run the extension test await runTests({ diff --git a/src/test/unittest/inlineValue/pythonInlineValueProvider.unit.test.ts b/src/test/unittest/inlineValue/pythonInlineValueProvider.unit.test.ts index 53ca560c..13815205 100644 --- a/src/test/unittest/inlineValue/pythonInlineValueProvider.unit.test.ts +++ b/src/test/unittest/inlineValue/pythonInlineValueProvider.unit.test.ts @@ -10,7 +10,7 @@ import * as sinon from 'sinon'; import { use, expect } from 'chai'; import { EXTENSION_ROOT_DIR_FOR_TESTS } from '../../constants'; import { PythonInlineValueProvider } from '../../../extension/debugger/inlineValue/pythonInlineValueProvider'; -import { workspace, Range, InlineValueContext, WorkspaceConfiguration } from 'vscode'; +import { workspace, Range, InlineValueContext, WorkspaceConfiguration, InlineValue } from 'vscode'; import * as vscodeapi from '../../../extension/common/vscodeapi'; use(chaiAsPromised); @@ -98,102 +98,39 @@ suite('Debugging - pythonInlineProvider', () => { const context = { frameId: 0, stoppedLocation: new Range(4, 1, 4, 1) } as InlineValueContext; const result = await inlineValueProvider.provideInlineValues(document, viewPort, context); - const expected = [ + const expected: InlineValue[] = [ { - range: { - c: { - c: 0, - e: 0, - }, - e: { - c: 0, - e: 4, - }, - }, + range: new Range(0, 0, 0, 4), variableName: 'var1', caseSensitiveLookup: false, }, { - range: { - c: { - c: 0, - e: 6, - }, - e: { - c: 0, - e: 10, - }, - }, + range: new Range(0, 6, 0, 10), variableName: 'var2', caseSensitiveLookup: false, }, { - range: { - c: { - c: 1, - e: 0, - }, - e: { - c: 1, - e: 4, - }, - }, + range: new Range(1, 0, 1, 4), variableName: 'var3', caseSensitiveLookup: false, }, { - range: { - c: { - c: 2, - e: 0, - }, - e: { - c: 2, - e: 4, - }, - }, + range: new Range(2, 0, 2, 4), variableName: 'var4', caseSensitiveLookup: false, }, { - range: { - c: { - c: 3, - e: 0, - }, - e: { - c: 3, - e: 4, - }, - }, + range: new Range(3, 0, 3, 4), variableName: 'var5', caseSensitiveLookup: false, }, { - range: { - c: { - c: 4, - e: 7, - }, - e: { - c: 4, - e: 11, - }, - }, + range: new Range(4, 7, 4, 11), variableName: 'var1', caseSensitiveLookup: false, }, { - range: { - c: { - c: 4, - e: 14, - }, - e: { - c: 4, - e: 18, - }, - }, + range: new Range(4, 14, 4, 18), variableName: 'var2', caseSensitiveLookup: false, }, @@ -244,55 +181,19 @@ suite('Debugging - pythonInlineProvider', () => { const result = await inlineValueProvider.provideInlineValues(document, viewPort, context); const expected = [ { - range: { - c: { - c: 3, - e: 8, - }, - e: { - c: 3, - e: 17, - }, - }, + range: new Range(3, 8, 3, 17), expression: 'self.name', }, { - range: { - c: { - c: 4, - e: 8, - }, - e: { - c: 4, - e: 16, - }, - }, + range: new Range(4, 8, 4, 16), expression: 'self.age', }, { - range: { - c: { - c: 7, - e: 18, - }, - e: { - c: 7, - e: 27, - }, - }, + range: new Range(7, 18, 7, 27), expression: 'self.name', }, { - range: { - c: { - c: 7, - e: 29, - }, - e: { - c: 7, - e: 37, - }, - }, + range: new Range(7, 29, 7, 37), expression: 'self.age', }, ]; @@ -352,16 +253,7 @@ suite('Debugging - pythonInlineProvider', () => { const result = await inlineValueProvider.provideInlineValues(document, viewPort, context); const expected = [ { - range: { - c: { - c: 11, - e: 0, - }, - e: { - c: 11, - e: 10, - }, - }, + range: new Range(11, 0, 11, 10), expression: 'person1.id', }, ]; @@ -411,128 +303,47 @@ suite('Debugging - pythonInlineProvider', () => { const result = await inlineValueProvider.provideInlineValues(document, viewPort, context); const expected = [ { - range: { - c: { - c: 0, - e: 0, - }, - e: { - c: 0, - e: 9, - }, - }, + range: new Range(0, 0, 0, 9), variableName: 'some_list', caseSensitiveLookup: false, }, { - range: { - c: { - c: 1, - e: 0, - }, - e: { - c: 1, - e: 1, - }, - }, + range: new Range(1, 0, 1, 1), variableName: 'x', caseSensitiveLookup: false, }, { - range: { - c: { - c: 2, - e: 4, - }, - e: { - c: 2, - e: 5, - }, - }, + range: new Range(2, 4, 2, 5), variableName: 'n', caseSensitiveLookup: false, }, { - range: { - c: { - c: 2, - e: 13, - }, - e: { - c: 2, - e: 22, - }, - }, + range: new Range(2, 13, 2, 22), variableName: 'some_list', caseSensitiveLookup: false, }, { - range: { - c: { - c: 2, - e: 27, - }, - e: { - c: 2, - e: 28, - }, - }, + range: new Range(2, 27, 2, 28), variableName: 'x', caseSensitiveLookup: false, }, { - range: { - c: { - c: 3, - e: 13, - }, - e: { - c: 3, - e: 14, - }, - }, + range: new Range(3, 13, 3, 14), variableName: 'n', caseSensitiveLookup: false, }, { - range: { - c: { - c: 3, - e: 16, - }, - e: { - c: 3, - e: 17, - }, - }, + range: new Range(3, 16, 3, 17), variableName: 'x', caseSensitiveLookup: false, }, { - range: { - c: { - c: 5, - e: 13, - }, - e: { - c: 5, - e: 14, - }, - }, + range: new Range(5, 13, 5, 14), variableName: 'n', caseSensitiveLookup: false, }, { - range: { - c: { - c: 5, - e: 16, - }, - e: { - c: 5, - e: 17, - }, - }, + range: new Range(5, 16, 5, 17), variableName: 'x', caseSensitiveLookup: false, },