Skip to content

Commit 0a9392f

Browse files
karthiknadigKartik Raj
andauthored
Merge debugpy into master. (microsoft#10290)
* Point to debugpy in the core extension (microsoft#10178) * Rename gulp task to install new debugpy * Fix install_ptvsd.py file and its references * Update yaml files * Make sure the paths in factory.ts point to debugpy when using DebugAdapterExectable * Fix tests * Correct install debugger wheels * Rename ptvsd methods to generic debugger name * Updated child process hook to support 'debugpy_attach' request * News entry * Format gulpfile.js * Use generic debugger name * Update method getRemoteDebuggerArgs() and add tests * Rename new_debugpy to debugpy * Oops * DataScience: Update debugger to point to debugpy (microsoft#10214) * Update datascience bits to debugpy. * Cleanup * Adds a prompt that shows up when user attaches to `ptvsd` (microsoft#10338) * Add prompt when using ptvsd to attach * Update prompt message. * Update tests. * Fix text and grammar Co-authored-by: Kartik Raj <karraj@microsoft.com>
1 parent 8a092e9 commit 0a9392f

29 files changed

Lines changed: 1170 additions & 727 deletions

.github/workflows/ci.yml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,30 +40,30 @@ jobs:
4040
run: |
4141
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt
4242
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python/old_ptvsd --no-cache-dir --implementation py --no-deps --upgrade 'ptvsd==4.3.2'
43-
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python/new_ptvsd/no_wheels --no-cache-dir --implementation py --no-deps --upgrade --pre ptvsd
43+
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python/debugpy/no_wheels --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy
4444
45-
- name: Install ptvsd wheels
45+
- name: Install debugpy wheels
4646
run: |
4747
python -m pip --disable-pip-version-check install -r build/debugger-install-requirements.txt
48-
python ./pythonFiles/install_ptvsd.py
48+
python ./pythonFiles/install_debugpy.py
4949
50-
# Retrieve the list of ptvsd versions from PyPI in order to increase the specificity of the pip cache key,
50+
# Retrieve the list of debugpy versions from PyPI in order to increase the specificity of the pip cache key,
5151
# so that the cache gets invalidated as necessary.
5252
# See https://github.com/microsoft/vscode-python/pull/9843#discussion_r373635221
53-
- name: curl PyPI to get ptvsd versions
54-
run: curl --output ptvsd.json https://pypi.org/pypi/ptvsd/json
53+
- name: curl PyPI to get debugpy versions
54+
run: curl --output debugpy.json https://pypi.org/pypi/debugpy/json
5555

5656
- name: Cache pip files
5757
uses: actions/cache@v1
5858
with:
5959
path: ~/.cache/pip
60-
key: ${{runner.os}}-${{env.CACHE_PIP_DEPS}}-pip-${{env.PYTHON_VERSION}}-${{hashFiles('requirements.txt')}}-${{hashFiles('build/debugger-install-requirements.txt')}}-${{hashFiles('ptvsd.json')}}
60+
key: ${{runner.os}}-${{env.CACHE_PIP_DEPS}}-pip-${{env.PYTHON_VERSION}}-${{hashFiles('requirements.txt')}}-${{hashFiles('build/debugger-install-requirements.txt')}}-${{hashFiles('debugpy.json')}}
6161

6262
- name: Cache ./pythonFiles/lib/python
6363
uses: actions/cache@v1
6464
with:
6565
path: ./pythonFiles/lib/python
66-
key: ${{runner.os}}-${{env.CACHE_PYTHONFILES}}-pythonFiles-${{env.PYTHON_VERSION}}-${{hashFiles('requirements.txt')}}-${{hashFiles('build/debugger-install-requirements.txt')}}-${{hashFiles('ptvsd.json')}}
66+
key: ${{runner.os}}-${{env.CACHE_PYTHONFILES}}-pythonFiles-${{env.PYTHON_VERSION}}-${{hashFiles('requirements.txt')}}-${{hashFiles('build/debugger-install-requirements.txt')}}-${{hashFiles('debugpy.json')}}
6767

6868
js-ts-deps:
6969
name: Install npm dependencies
@@ -148,14 +148,14 @@ jobs:
148148
path: ~/.npm
149149
key: ${{runner.os}}-${{env.CACHE_NPM_DEPS}}-${{hashFiles('package-lock.json')}}
150150

151-
- name: curl PyPI to get ptvsd versions
152-
run: curl --output ptvsd.json https://pypi.org/pypi/ptvsd/json
151+
- name: curl PyPI to get debugpy versions
152+
run: curl --output debugpy.json https://pypi.org/pypi/debugpy/json
153153

154154
- name: Retrieve cached pythonFiles/ directory
155155
uses: actions/cache@v1
156156
with:
157157
path: ./pythonFiles/lib/python
158-
key: ${{runner.os}}-${{env.CACHE_PYTHONFILES}}-pythonFiles-${{env.PYTHON_VERSION}}-${{hashFiles('requirements.txt')}}-${{hashFiles('build/debugger-install-requirements.txt')}}-${{hashFiles('ptvsd.json')}}
158+
key: ${{runner.os}}-${{env.CACHE_PYTHONFILES}}-pythonFiles-${{env.PYTHON_VERSION}}-${{hashFiles('requirements.txt')}}-${{hashFiles('build/debugger-install-requirements.txt')}}-${{hashFiles('debugpy.json')}}
159159

160160
- name: Install dependencies (npm ci)
161161
run: npm ci --prefer-offline
@@ -222,28 +222,28 @@ jobs:
222222
with:
223223
python-version: ${{matrix.python}}
224224

225-
- name: curl PyPI to get ptvsd versions
226-
run: curl --output ptvsd.json https://pypi.org/pypi/ptvsd/json
225+
- name: curl PyPI to get debugpy versions
226+
run: curl --output debugpy.json https://pypi.org/pypi/debugpy/json
227227

228228
- name: Retrieve cached pythonFiles/ directory
229229
uses: actions/cache@v1
230230
# Use an id for this step so that its cache-hit output can be accessed and checked in the next step.
231231
id: pythonFiles-cache
232232
with:
233233
path: ./pythonFiles/lib/python
234-
key: ${{runner.os}}-${{env.CACHE_PYTHONFILES}}-pythonFiles-${{env.PYTHON_VERSION}}-${{hashFiles('requirements.txt')}}-${{hashFiles('build/debugger-install-requirements.txt')}}-${{hashFiles('ptvsd.json')}}
234+
key: ${{runner.os}}-${{env.CACHE_PYTHONFILES}}-pythonFiles-${{env.PYTHON_VERSION}}-${{hashFiles('requirements.txt')}}-${{hashFiles('build/debugger-install-requirements.txt')}}-${{hashFiles('debugpy.json')}}
235235

236236
- name: Install Python requirements if not cached
237237
run: |
238238
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt
239239
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python/old_ptvsd --no-cache-dir --implementation py --no-deps --upgrade 'ptvsd==4.3.2'
240-
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python/new_ptvsd/no_wheels --no-cache-dir --implementation py --no-deps --upgrade --pre ptvsd
240+
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python/debugpy/no_wheels --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy
241241
if: steps.pythonFiles-cache.outputs.cache-hit == false
242242

243-
- name: Install ptvsd wheels if not cached
243+
- name: Install debugpy wheels if not cached
244244
run: |
245245
python -m pip --disable-pip-version-check install -r build/debugger-install-requirements.txt
246-
python ./pythonFiles/install_ptvsd.py
246+
python ./pythonFiles/install_debugpy.py
247247
if: steps.pythonFiles-cache.outputs.cache-hit == false
248248

249249
- name: Install test requirements

build/ci/templates/steps/build.yml

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -12,50 +12,50 @@
1212
# If `true`, means we need to build the VSIX, else just compile.
1313

1414
steps:
15-
- template: initialization.yml
16-
parameters:
17-
PythonVersion: $(PythonVersion)
18-
workingDirectory: $(Build.SourcesDirectory)
19-
compile: 'false'
20-
21-
- bash: |
22-
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt
23-
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python/old_ptvsd --no-cache-dir --implementation py --no-deps --upgrade 'ptvsd==4.3.2'
24-
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python/new_ptvsd/no_wheels --no-cache-dir --implementation py --no-deps --upgrade --pre ptvsd
25-
failOnStderr: true
26-
displayName: 'pip install requirements'
27-
28-
- bash: |
29-
python -m pip --disable-pip-version-check install -r build/debugger-install-requirements.txt
30-
python ./pythonFiles/install_ptvsd.py
31-
failOnStderr: true
32-
displayName: 'Install PTVSD wheels'
33-
34-
- bash: npm run clean
35-
displayName: 'Clean'
36-
37-
- bash: |
38-
npm run updateBuildNumber -- --buildNumber $BUILD_BUILDID
39-
displayName: 'Update dev Version of Extension'
40-
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], 'master'))
41-
42-
- bash: |
43-
npm run updateBuildNumber -- --buildNumber $BUILD_BUILDID --updateChangelog
44-
displayName: 'Update release Version of Extension'
45-
condition: and(succeeded(), startsWith(variables['Build.SourceBranchName'], 'release'))
46-
47-
- bash: |
48-
npm run package
49-
displayName: 'Build VSIX'
50-
51-
- task: CopyFiles@2
52-
inputs:
53-
contents: '*.vsix'
54-
targetFolder: $(Build.ArtifactStagingDirectory)
55-
displayName: 'Copy VSIX'
56-
57-
- task: PublishBuildArtifacts@1
58-
inputs:
59-
pathtoPublish: $(Build.ArtifactStagingDirectory)
60-
artifactName: VSIX
61-
displayName: 'Publish VSIX to Artifacts'
15+
- template: initialization.yml
16+
parameters:
17+
PythonVersion: $(PythonVersion)
18+
workingDirectory: $(Build.SourcesDirectory)
19+
compile: 'false'
20+
21+
- bash: |
22+
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python --no-cache-dir --implementation py --no-deps --upgrade -r requirements.txt
23+
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python/old_ptvsd --no-cache-dir --implementation py --no-deps --upgrade 'ptvsd==4.3.2'
24+
python -m pip --disable-pip-version-check install -t ./pythonFiles/lib/python/debugpy/no_wheels --no-cache-dir --implementation py --no-deps --upgrade --pre debugpy
25+
failOnStderr: true
26+
displayName: 'pip install requirements'
27+
28+
- bash: |
29+
python -m pip --disable-pip-version-check install -r build/debugger-install-requirements.txt
30+
python ./pythonFiles/install_debugpy.py
31+
failOnStderr: true
32+
displayName: 'Install DEBUGPY wheels'
33+
34+
- bash: npm run clean
35+
displayName: 'Clean'
36+
37+
- bash: |
38+
npm run updateBuildNumber -- --buildNumber $BUILD_BUILDID
39+
displayName: 'Update dev Version of Extension'
40+
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], 'master'))
41+
42+
- bash: |
43+
npm run updateBuildNumber -- --buildNumber $BUILD_BUILDID --updateChangelog
44+
displayName: 'Update release Version of Extension'
45+
condition: and(succeeded(), startsWith(variables['Build.SourceBranchName'], 'release'))
46+
47+
- bash: |
48+
npm run package
49+
displayName: 'Build VSIX'
50+
51+
- task: CopyFiles@2
52+
inputs:
53+
contents: '*.vsix'
54+
targetFolder: $(Build.ArtifactStagingDirectory)
55+
displayName: 'Copy VSIX'
56+
57+
- task: PublishBuildArtifacts@1
58+
inputs:
59+
pathtoPublish: $(Build.ArtifactStagingDirectory)
60+
artifactName: VSIX
61+
displayName: 'Publish VSIX to Artifacts'

0 commit comments

Comments
 (0)