Closed
Description
Refs: microsoft/vscode-python#19503
- macOS @roblourens
- linux @rzhao271
- windows @luabud
Complexity: 3
Author: @paulacamargo25
Prerequisites:
- Install python, version >= 3.7
- Install the
debugpy
extension.
Automatically detect a Flask application and run it with the correct Debug Configuration.
Steps
Part 1: Debugging python file
- Create a python file with a simple code.
- Head over to the Run And Debug tab, and click on Show all automatic debug configurations.
Verification
- Make sure that the application has been executed correctly, you can put some breakpoints, to test that the debugging works.
- . If you repeat the steps and instead of clicking the option, you click the wheel, it should open the launch.json file with the configuration prefilled. Make sure this is correct and can be debugged.
- Another form to show the automatic configuration is typing 'debug ' (with a space) in Quick open (⌘P) or by triggering the Debug: Select and Start Debugging command. Test that the recognition works here too.
Part 2: Try other automatic configuration
- There are automatic configurations implemented for Django, FastApi and Flask, if you have any of these projects you can try that they also work with them. Because this functionality has already been tested in the Python extension, you don't need to test each one. The idea of this tpi is to make sure that it also works in the
debugpy
extension. Trying one of them is enough.