Skip to content

Commit

Permalink
Update Python Debug Adapter Protocol to debugpy (#58)
Browse files Browse the repository at this point in the history
* update DAP to debugpy

* update docs and pip install
  • Loading branch information
isVoid authored Dec 18, 2021
1 parent c3b2526 commit 5deb6b2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ To debug tests running in the container, use the `rapids.cudf.pytest.debug`:
make rapids.cudf.pytest.debug args="-k 'test_reindex_dataframe'"
```

This launches pytest with `ptvsd` for debugging in VSCode.
This launches pytest with `debugpy` for debugging in VSCode.


### Working interactively in the RAPIDS container
Expand Down
6 changes: 3 additions & 3 deletions etc/bash-utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
# Commands to run each project's pytests:
#
# Note: These commands automatically change into the correct directory before executing `pytest`.
# Note: Pass --debug to use with the VSCode debugger `ptvsd`. All other arguments are forwarded to pytest.
# Note: Pass --debug to use with the VSCode debugger `debugpy`. All other arguments are forwarded to pytest.
# Note: Arguments that end in '.py' are assumed to be pytest files used to reduce the number of tests
# collected on startup by pytest. These arguments will be expanded out to their full paths relative
# to the directory where pytests is run.
Expand All @@ -143,7 +143,7 @@
# Usage:
# test-cudf-python -n <num_cores> - Run all pytests in parallel with `pytest-xdist`
# test-cudf-python -v -x -k 'a_test_function_name' - Run all tests named 'a_test_function_name', be verbose, and exit on first fail
# test-cudf-python -v -x -k 'a_test_function_name' --debug - Run all tests named 'a_test_function_name', and start ptvsd for VSCode debugging
# test-cudf-python -v -x -k 'a_test_function_name' --debug - Run all tests named 'a_test_function_name', and start debugpy for VSCode debugging
# test-cudf-python -v -x -k 'test_a or test_b' foo/test_file.py - Run all tests named 'test_a' or 'test_b' in file paths matching foo/test_file.py
#
###
Expand Down Expand Up @@ -1259,7 +1259,7 @@ test-python() {
if [[ $debug != true ]]; then
eval "set -x; pytest $args $paths";
else
eval "set -x; python -m ptvsd --host 0.0.0.0 --port 5678 --wait -m pytest $args $paths";
eval "set -x; python -m debugpy --listen 0.0.0.0:5678 --wait-for-client -m pytest $args $paths";
fi
)
}
Expand Down
2 changes: 1 addition & 1 deletion etc/conda-merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dependencies:
- pytest-xdist
- python=${PYTHON_VERSION}
- pip:
- ptvsd
- debugpy
EOF

CUDA_TOOLKIT_VERSION=${CONDA_CUDA_TOOLKIT_VERSION:-$CUDA_SHORT_VERSION};
Expand Down

0 comments on commit 5deb6b2

Please sign in to comment.