# Debugging Python Tests in VSCode

By Corey J. Gallon · 2024-09-15 · https://gallon.me/debugging-python-tests-in-vscode.html

---

VSCode offers native test capabilities that are quite useful.  [Testing Python in Visual Studio Code](https://code.visualstudio.com/docs/python/testing)

It doesn’t, however, recognize your Python tests by default.  You must configure it to do so for each project.

Command Palette (CTRL+SHIFT+P) → “Python: Configure Tests” → 

![Command Palette Python Configure Tests.png](https://gallon.me/images/20240915_command_palette_python_configure_tests.png)

Select the framework you’re using:

![Command Palette Select Framework.png](https://gallon.me/images/20240915_command_palette_select_framework.png)

Now, you get all of the testy-goodness that VSCode has to offer for Python.

In this case, I wanted to [debug a specific test](https://code.visualstudio.com/docs/python/testing#_debug-tests).  Super easy! Just drop breakpoints in the test where you want them, then run “Debug Test”.

![Right Click Debug Test.png](https://gallon.me/images/20240915_right_click_debug_test.png)

The “Test Explorer” is also quite useful.
