-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: vscode debugger is not hitting breakpoints #64
fix: vscode debugger is not hitting breakpoints #64
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary by GPT-4
This code is a configuration file for Visual Studio Code (VSCode) to debug Python tests. It is written in JSON format and is used to configure the debugging settings for Python tests in VSCode.
Here's a breakdown of the code:
- The file starts with an opening curly brace
{
and ends with a closing curly brace}
. "version": "0.1.0"
specifies the version of the configuration file."configurations": [...]
is an array containing one or more debugging configurations.- Inside the configurations array, there's an object with several properties:
"name": "Debug Tests"
gives a name to this configuration."type": "python"
specifies that this configuration is for Python language."request": "launch"
indicates that this configuration will launch a new debugging session."program": "${file}"
tells VSCode to debug the currently opened file in the editor."purpose": ["debug-test"]
is an array containing one or more purposes for this configuration, in this case, it's for debugging tests."console": "integratedTerminal"
specifies that the integrated terminal should be used for input/output during debugging."justMyCode": false
disables filtering out external code during debugging, allowing you to step into external libraries' code if needed."env": {...}
sets environment variables for the debugging session. In this case, it setsPYTEST_ADDOPTS
variable with some options to disable coverage reporting and parallel test execution.
This configuration allows you to debug Python tests in VSCode by launching a new debugging session using the specified settings.
Suggestions
-
Add a newline at the end of the file to follow best practices and avoid potential issues with certain tools that expect a newline at the end of files.
-
Add a brief comment at the beginning of the file explaining its purpose, for example:
// This configuration file is for debugging Python tests in VSCode.
- Consider adding more configurations for different use cases, such as running individual tests or running tests with coverage enabled.
With these changes, your updated launch.json
file would look like this:
// This configuration file is for debugging Python tests in VSCode.
{
"version": "0.1.0",
"configurations": [
{
"name": "Debug Tests",
"type": "python",
"request": "launch",
"program": "${file}",
"purpose": [
"debug-test"
],
"console": "integratedTerminal",
"justMyCode": false,
"env": {
"PYTEST_ADDOPTS": "--no-cov -n0 --dist no"
}
}
]
}
Codecov Report
@@ Coverage Diff @@
## main #64 +/- ##
=======================================
Coverage 86.78% 86.78%
=======================================
Files 13 13
Lines 401 401
Branches 61 61
=======================================
Hits 348 348
Misses 37 37
Partials 16 16
Flags with carried forward coverage won't be shown. Click here to find out more. |
…warning from terminal output
Description
Testing
Additional context