|
| 1 | +## Getting Started |
| 2 | + |
| 3 | +``` |
| 4 | +git clone https://github.com/microsoft/vscode-python-debugger |
| 5 | +cd vscode-python-debugger |
| 6 | +npm ci |
| 7 | +# Create virtual environment as appropriate for your shell or use the command "Python: Create Environment" in VS Code |
| 8 | +python3 -m venv .venv |
| 9 | +# Activate the virtual environment as appropriate for your shell like: |
| 10 | +# ".venv/Scripts/activate.bat" |
| 11 | +# On bash/zsh it's ... |
| 12 | +source .venv/bin/activate |
| 13 | +python3 -m pip install nox |
| 14 | +nox --session setup_repo |
| 15 | +``` |
| 16 | + |
| 17 | +## Reporting Issues |
| 18 | + |
| 19 | +If you encounter any issues, please report them using the [GitHub Issues](https://github.com/microsoft/vscode-python-debugger/issues) page. Provide as much detail as possible, including steps to reproduce the issue and any relevant logs or screenshots. |
| 20 | + |
| 21 | +## Submitting Pull Requests |
| 22 | + |
| 23 | +1. Fork the repository and create your branch from `main`. |
| 24 | +2. If you've added code that should be tested, add tests. |
| 25 | +3. Ensure the test suite passes. |
| 26 | +4. Make sure your code passes lints and formatting requirements |
| 27 | +5. Submit a pull request. |
| 28 | + |
| 29 | +## Running Tests |
| 30 | + |
| 31 | +To run tests, use the following commands: |
| 32 | + |
| 33 | +``` |
| 34 | +npm run compile-tests |
| 35 | +npm run test |
| 36 | +``` |
| 37 | + |
| 38 | +Ensure all tests pass before submitting your pull request. |
| 39 | + |
| 40 | +## Coding Standards |
| 41 | + |
| 42 | +This project follows the coding standards and guidelines from the [vscode-python](https://github.com/microsoft/vscode-python/wiki/Coding#guidelines) repository. Please ensure your code adheres to these standards. |
| 43 | + |
| 44 | +## Code Formatting & Linting |
| 45 | + |
| 46 | +To check code formatting, run: |
| 47 | + |
| 48 | +``` |
| 49 | +npm run format-check |
| 50 | +``` |
| 51 | + |
| 52 | +To automatically fix formatting issues, run: |
| 53 | + |
| 54 | +``` |
| 55 | +npm run format-fix |
| 56 | +``` |
| 57 | + |
| 58 | +To lint your code, run: |
| 59 | + |
| 60 | +``` |
| 61 | +npm run lint |
| 62 | +``` |
| 63 | + |
| 64 | +Ensure there are no linting errors before submitting your pull request. |
| 65 | + |
| 66 | +## Python Code Linting and Formatting |
| 67 | + |
| 68 | +For Python code, this project uses `ruff` for linting and formatting. To check your Python code for linting and formatting issues, run: |
| 69 | + |
| 70 | +``` |
| 71 | +ruff check . |
| 72 | +``` |
| 73 | + |
| 74 | +To automatically fix formatting issues, run: |
| 75 | + |
| 76 | +``` |
| 77 | +ruff --fix . |
| 78 | +``` |
| 79 | + |
| 80 | +Ensure there are no linting or formatting errors before submitting your pull request. |
| 81 | + |
0 commit comments