Skip to content

TPI: Debugging Python, Test automatic configuration #36

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

Closed
3 tasks done
paulacamargo25 opened this issue Jun 26, 2023 · 0 comments
Closed
3 tasks done

TPI: Debugging Python, Test automatic configuration #36

paulacamargo25 opened this issue Jun 26, 2023 · 0 comments

Comments

@paulacamargo25
Copy link
Contributor

paulacamargo25 commented Jun 26, 2023

Refs: microsoft/vscode-python#19503

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

  1. Create a python file with a simple code.
  2. Head over to the Run And Debug tab, and click on Show all automatic debug configurations.

Screen Shot 2022-07-25 at 2 09 44 PM

3. A window will open with a list of options, choose `Debugpy`. 4. You should now see a list of debug options, and there should be the Python File option.

Verification

  1. Make sure that the application has been executed correctly, you can put some breakpoints, to test that the debugging works.
  2. . 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.
  3. 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

  1. 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.
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Jun 26, 2023
@rzhao271 rzhao271 added this to the June 2023 milestone Jun 26, 2023
@paulacamargo25 paulacamargo25 removed the triage-needed Needs assignment to the proper sub-team label Jun 27, 2023
@rzhao271 rzhao271 self-assigned this Jun 27, 2023
@luabud luabud self-assigned this Jun 27, 2023
@roblourens roblourens self-assigned this Jun 27, 2023
@luabud luabud removed their assignment Jun 27, 2023
@rzhao271 rzhao271 assigned roblourens and unassigned roblourens and rzhao271 Jun 27, 2023
This was referenced Jun 27, 2023
@roblourens roblourens removed their assignment Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants