I use Visual studio code to edit my Behave scenarios and Python steps.
I have been able to run my steps using the Visual Studio Code console.
I have not been able to configure the python debugger to debug my Python scripts when they are called by behave.
How can I use the Visual Studion Code Python debugger with Behave.exe ? What would be the debug configuration parameters?visual studio code launch.json
Local computer: start the VS Code debugger using the modified Python: Attach configuration and the Start Debugging button. VS Code should stop on your locally set breakpoints, allowing you to step through the code, examine variables, and perform all other debugging actions.
Behave scripts can be debugged by dry running the test steps. The dry run helps to go over all the test steps without actually running it. It helps to determine the un-defined steps in the step definition file. It verifies if there are any missing import statements, syntax errors, and so on.
Add configuration for start debugin current features:
{
"name": "Python: Behave current file",
"type": "python",
"request": "launch",
"module": "behave",
"console": "integratedTerminal",
"args": [
"${file}"
]
},
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With