Skip to content

Commit

Permalink
Update branch for debugpy 1.5.1 with last changes in main (#124)
Browse files Browse the repository at this point in the history
* update pre release (#71)

* Add port provider (#85)

* Add port attribute provider

* Add message

* Enabled proposed api

* Ignore all the ports

* Fix format

* fix pr comments

* Add regex for terminal command

* Add adapter to pattern

* Add global configuration for justMyCode (#91)

* Aff configuration

* Read just my code from settings too

* fix tests

* fix lint

* Update extension name (#84)

* Update package.json

* Fix readme

* update debug type name

* Fix tests

* Fix lint

* Fix test

* Update translations

* revert extension id

* Fix tests

* fix lint

* Update debug type name

* Fix translations and lint

* update debug type

* fix lint

* use version 1.7 (#95)

* Remove default justMyCode (#100)

* Fix error in workspace (#101)

* Fix error in workspace

* fix test and lint

* Fix format

* Bump mheap/github-action-required-labels from 3 to 5 (#23)

Bumps [mheap/github-action-required-labels](https://github.com/mheap/github-action-required-labels) from 3 to 5.
- [Release notes](https://github.com/mheap/github-action-required-labels/releases)
- [Commits](mheap/github-action-required-labels@v3...v5)

---
updated-dependencies:
- dependency-name: mheap/github-action-required-labels
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump @typescript-eslint/parser from 5.59.11 to 5.62.0 (#61)

Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.59.11 to 5.62.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.62.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump typescript from 5.1.3 to 5.2.2 (#79)

Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.1.3 to 5.2.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](microsoft/TypeScript@v5.1.3...v5.2.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update npm packages (#105)

* update package.json

* Fux lint

* Update to node 18 (#106)

* Platform-specific vsix (#89)

* Update nox file and pre release

* update args

* update value

* see params

* echo vars

* fix args

* fix args

* Fix error obj to string

* fix command line error

* update args

* update how access values

* Add args

* Send arguments

* tried ith arguments

* update value

* remove args extra

* update run

* send as env

* add to see other values

* update env variables

* use VSCETARGET

* fix variable

* Fix macOs error

* Fix lint in nox file

* Fix nox hash comparison

* Fix default value

* Remove unnecessary code

* Update platform url and debugpy version

* Fix dict key name

* Remove vsix for all platforms

* Fix pr comments

* fix download function

* fix hash code

* Read from json pypypackage

* add json file and session that creates it

* Reformat nox file

* resolve comments

* fix lint error

* update pipeline

* fix build error

* dont hardcode the hash

* Fix GDPR comments (#113)

* Update readme (#111)

* Update readme

* Update README.md

Co-authored-by: Luciana Abud <[email protected]>

---------

Co-authored-by: Luciana Abud <[email protected]>

* Remove build folder from bundled vsix (#120)

* Update debugpy version

* Update nox and  pipelines

* update json file

* fix actions

* fix 3.6 error

* fix error running with 3.6

* fix lint

* update python version

* fix error in lint pipeline

* update pipelines

* fix nox file

* fix tests

* fix pipeline error

* fix lint

* use python 3.6

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Logan Ramos <[email protected]>
Co-authored-by: Luciana Abud <[email protected]>
Co-authored-by: Don Jayamanne <[email protected]>
  • Loading branch information
5 people authored Jan 15, 2024
1 parent b5b9c48 commit aa64a98
Show file tree
Hide file tree
Showing 55 changed files with 1,435 additions and 858 deletions.
13 changes: 6 additions & 7 deletions .github/actions/build-vsix/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ runs:
node-version: ${{ inputs.node_version }}
cache: 'npm'

# Minimum supported version is Python 3.7
- name: Use Python 3.7
- name: Use Python 3.6
uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.6

- name: Pip cache
uses: actions/cache@v3
Expand All @@ -30,23 +29,23 @@ runs:
${{ runner.os }}-pip-build-vsix-
# For faster/better builds of sdists.
- name: Update pip, install pipx and install wheel
run: python -m pip install -U pip pipx wheel
- name: Update pip, install nox and install wheel
run: python -m pip install -U pip nox wheel
shell: bash

- name: Run npm ci
run: npm ci --prefer-offline
shell: bash

- name: Install bundled python libraries
run: pipx run nox --session install_old_bundled_libs
run: python -m nox --session install_bundled_libs
shell: bash

# Use the GITHUB_RUN_ID environment variable to update the build number.
# GITHUB_RUN_ID is a unique number for each run within a repository.
# This number does not change if you re-run the workflow run.
- name: Update extension build number
run: pipx run nox --session update_build_number -- $GITHUB_RUN_ID
run: python -m nox --session update_build_number -- $GITHUB_RUN_ID
shell: bash

- name: Build VSIX
Expand Down
8 changes: 4 additions & 4 deletions .github/actions/lint/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ runs:
${{ runner.os }}-pip-lint-
# For faster/better builds of sdists.
- name: Update pip, install pipx and install wheel
run: python -m pip install -U pip pipx wheel
- name: Update pip, install nox and install wheel
run: python -m pip install -U pip nox wheel
shell: bash

# This will install libraries to a target directory.
- name: Install bundled python libraries
run: pipx run nox --session install_old_bundled_libs
run: python -m nox --session install_bundled_libs
shell: bash

- name: Check linting and formatting
run: pipx run nox --session lint
run: python -m nox --session lint
shell: bash
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
permissions:
actions: read
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/issue-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
# From https://github.com/marketplace/actions/github-script#apply-a-label-to-an-issue.
add-triage-label:
name: "Add 'triage-needed'"
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/github-script@v6
with:
Expand Down
27 changes: 13 additions & 14 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:

env:
NODE_VERSION: 16.17.0
NODE_VERSION: 18.17.1
TEST_RESULTS_DIRECTORY: .
# Force a path with spaces and unicode chars to test extension works in these scenarios
special-working-directory: './🐍 🐛'
Expand All @@ -13,7 +13,7 @@ env:
jobs:
build-vsix:
name: Create VSIX
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -25,7 +25,7 @@ jobs:

lint:
name: Lint
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -44,7 +44,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu-20.04, windows-latest]
python: ['3.6']

steps:
Expand All @@ -53,19 +53,18 @@ jobs:
with:
path: ${{ env.special-working-directory-relative }}

# Install bundled libs using 3.6 even though you test it on other versions.
- name: Use Python 3.6
uses: actions/setup-python@v4
uses: actions/setup-python@v3
with:
python-version: '3.6'

- name: Update pip, install pipx and install wheel
run: python -m pip install -U pip pipx wheel
- name: Update pip, install nox and install wheel
run: python -m pip install -U pip nox wheel
shell: bash

# This will install libraries to a target directory.
- name: Install bundled python libraries
run: pipx run nox --session install_old_bundled_libs
run: python -m nox --session install_bundled_libs
shell: bash

- name: Install Node
Expand All @@ -78,16 +77,16 @@ jobs:
- name: Install dependencies (npm ci)
run: npm ci

# Now that the bundle is installed to target using python 3.7
# Now that the bundle is installed to target using python 3.6
# switch back the python we want to test with
- name: Use Python ${{ matrix.python }}
uses: actions/setup-python@v4
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python }}

# The new python may not have nox so install it again
- name: Update pip, install pipx and install wheel (again)
run: python -m pip install -U pip pipx wheel
- name: Update pip, install nox and install wheel (again)
run: python -m pip install -U pip nox wheel
shell: bash

- name: Start xvfb on Linux
Expand All @@ -98,7 +97,7 @@ jobs:
if: ${{ runner.os }} == 'Linux'

- name: Run tests
run: pipx run nox --session tests
run: python -m nox --session tests
shell: bash
env:
DISPLAY: ${{ env.DISPLAY }}
4 changes: 2 additions & 2 deletions .github/workflows/pr-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ on:
jobs:
add-pr-label:
name: 'Ensure Required Labels'
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: 'PR impact specified'
uses: mheap/github-action-required-labels@v3
uses: mheap/github-action-required-labels@v5
with:
mode: exactly
count: 1
Expand Down
27 changes: 13 additions & 14 deletions .github/workflows/push-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- 'release-*'

env:
NODE_VERSION: 16.17.0
NODE_VERSION: 18.17.1
TEST_RESULTS_DIRECTORY: .
# Force a path with spaces and unicode chars to test extension works in these scenarios
special-working-directory: './🐍 🐛'
Expand All @@ -18,7 +18,7 @@ env:
jobs:
build-vsix:
name: Create VSIX
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -30,7 +30,7 @@ jobs:

lint:
name: Lint
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -49,7 +49,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
os: [ubuntu-20.04, windows-latest]
python: ['3.6']

steps:
Expand All @@ -58,19 +58,18 @@ jobs:
with:
path: ${{ env.special-working-directory-relative }}

# Install bundled libs using 3.6 even though you test it on other versions.
- name: Use Python 3.6
uses: actions/setup-python@v4
uses: actions/setup-python@v3
with:
python-version: '3.6'

- name: Update pip, install pipx and install wheel
run: python -m pip install -U pip pipx wheel
- name: Update pip, install nox and install wheel
run: python -m pip install -U pip nox wheel
shell: bash

# This will install libraries to a target directory.
- name: Install bundled python libraries
run: pipx run nox --session install_old_bundled_libs
run: python -m nox --session install_bundled_libs
shell: bash

- name: Install Node
Expand All @@ -83,16 +82,16 @@ jobs:
- name: Install dependencies (npm ci)
run: npm ci

# Now that the bundle is installed to target using python 3.7
# Now that the bundle is installed to target using python 3.6
# switch back the python we want to test with
- name: Use Python ${{ matrix.python }}
uses: actions/setup-python@v4
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python }}

# The new python may not have nox so install it again
- name: Update pip, install pipx and install wheel (again)
run: python -m pip install -U pip pipx wheel
- name: Update pip, install nox and install wheel (again)
run: python -m pip install -U pip nox wheel
shell: bash

- name: Start xvfb on Linux
Expand All @@ -103,5 +102,5 @@ jobs:
if: ${{ runner.os }} == 'Linux'

- name: Run tests
run: pipx run nox --session tests
run: python -m nox --session tests
shell: bash
3 changes: 2 additions & 1 deletion .vscodeignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.vscode/**
.vscode-test/**
build/**
out/**
node_modules/**
src/**
Expand All @@ -20,4 +21,4 @@ noxfile.py
.pytest_cache/**
.pylintrc
**/requirements.txt
**/requirements.in
**/requirements.in
30 changes: 21 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,37 @@
# Debugpy extension for Visual Studio Code
# Python Debugger extension for Visual Studio Code

A [Visual Studio Code](https://code.visualstudio.com/) [extension](https://marketplace.visualstudio.com/VSCode) that supports Python debugging with debugpy. debugpy provides a seamless debugging experience by allowing you to set breakpoints, step through code, inspect variables, and perform other essential debugging tasks. The debugy extension offers debugging support for various types of Python applications including scripts, web applications, remote processes, and multi-threaded processes.
A [Visual Studio Code](https://code.visualstudio.com/) [extension](https://marketplace.visualstudio.com/VSCode) that supports Python debugging with debugpy. Python Debugger provides a seamless debugging experience by allowing you to set breakpoints, step through code, inspect variables, and perform other essential debugging tasks. The debugy extension offers debugging support for various types of Python applications including scripts, web applications, remote processes, and multi-threaded processes.

Note:
- The Python extension offers the debugpy extension as an optional installation, including it during the setup process.
- The Python extension offers the python debugger extension as an optional installation, including it during the setup process.
- This extension is supported for all [actively supported versions](https://devguide.python.org/#status-of-python-branches) of the Python language (i.e., Python >= 3.7).


## Purpose

The main intent of this extension is to offer:

1. **Independence and Compatibility:** The Python Debugger extension aims to separate the debugging functionality from the main Python extension to prevent compatibility issues. This ensures that even as the Python extension drops support for older Python versions (e.g., Python 3.7), you can continue debugging projects with those versions without downgrading your Python extension. This allows you to access new features and bug fixes while keeping your debugging capabilities intact.

2. **Platform-Specific Builds:** Unlike the main Python extension, which bundles all debugpy builds for various platforms into a single extension package, the Python Debugger extension provides a more streamlined approach: it delivers platform-specific builds, ensuring you only receive the components relevant to your specific operating system. This reduces download times and unnecessary overhead.

3. **Feature Parity and Ongoing Updates:** This extension replicates all the functionality available in the main Python extension, and more. Going forward, any new debugger features will be added to this extension. In the future, the Python extension will no longer offer debugging support on its own, and we will transition all debugging support to this extension for all debugging functionality.


## Usage

Once installed in Visual Studio Code, debugpy will be automatically activated when you open a Python file.
Once installed in Visual Studio Code, python-debugger will be automatically activated when you open a Python file.

## Disabling the Debugpy extension
If you want to disable the Debugpy extension, you can [disable this extension](https://code.visualstudio.com/docs/editor/extension-marketplace#_disable-an-extension) per workspace in Visual Studio Code.
## Disabling the Python Debugger extension
If you want to disable the Python Debugger extension, you can [disable this extension](https://code.visualstudio.com/docs/editor/extension-marketplace#_disable-an-extension) per workspace in Visual Studio Code.

## Commands

| Command | Description |
| ---------------------- | --------------------------------- |
| Debugpy: viewOutput | Show the debugpy extension output. |
| Debugpy: clearCacheAndReload | Allows you to clear the global values set in the extension. |
| Debugpy: debugInTerminal | Allows you to debug a simple Python file in the terminal. |
| Python Debugger: viewOutput | Show the Python Debugger Extension output. |
| Python Debugger: clearCacheAndReload | Allows you to clear the global values set in the extension. |
| Python Debugger: debugInTerminal | Allows you to debug a simple Python file in the terminal. |

## Data and telemetry
The Debubpy Extension for Visual Studio Code collects usage data and sends it to Microsoft to help improve our products and services. Read our [privacy statement](https://privacy.microsoft.com/privacystatement) to learn more. This extension respects the `telemetry.enableTelemetry` setting which you can learn more about at https://code.visualstudio.com/docs/supporting/faq#_how-to-disable-telemetry-reporting.
40 changes: 33 additions & 7 deletions build/azure-pipeline.pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,36 @@ extends:
template: azure-pipelines/extension/pre-release.yml@templates
parameters:
l10nSourcePaths: ./src
buildPlatforms:
- name: Linux
packageArch: arm64
vsceTarget: linux-arm64
- name: Linux
packageArch: arm
vsceTarget: linux-armhf
- name: Linux
packageArch: x64
vsceTarget: linux-x64
- name: MacOS
packageArch: arm64
vsceTarget: darwin-arm64
- name: MacOS
packageArch: x64
vsceTarget: darwin-x64
- name: Windows
packageArch: arm
vsceTarget: win32-arm64
- name: Windows
packageArch: ia32
vsceTarget: win32-ia32
- name: Windows
packageArch: x64
vsceTarget: win32-x64

buildSteps:
- task: NodeTool@0
inputs:
versionSpec: '16.17.1'
versionSpec: '18.17.1'
displayName: Select Node version

- task: UsePythonVersion@0
Expand All @@ -47,14 +73,14 @@ extends:
- script: python -m pip install -U pip
displayName: Upgrade pip

- script: python -m pip install wheel
displayName: Install wheel

- script: python -m pip install nox
displayName: Install wheel
- script: python -m pip install wheel nox
displayName: Install wheel and nox

- script: python -m nox --session install_old_bundled_libs
# update according packageArch
- script: python -m nox --session install_bundled_libs
displayName: Install Python dependencies
env:
VSCETARGET: ${{ variables.VSCETARGET }}

- script: python ./build/update_ext_version.py --for-publishing
displayName: Update build number
Expand Down
Loading

0 comments on commit aa64a98

Please sign in to comment.