Closed
Description
Refs: microsoft/vscode-python#19503
- macOS @connor4312
- linux @rzhao271
- windows @luabud
Complexity: 3
Author: @paulacamargo25
Prerequisites:
- Install python version >= 3.7
- Install the
debugpy
extension.
Part 1: Attach using Process Id
- Run a python project in a external terminal, It can be a python program with an input, or a more complex application like django, flask FastApi.
- Open vscode insiders, and open the folder with the python file/project.
- Go to
Run and debug
, thenCreate a launch.json file
- Select Debugpy > Attach using Process Id
- Make sure the configuration has been created correctly, that is, that the type is
debugpy
, the name. - Run the configuration and select your application from the list.
- Add breakpoint, change interpreters, play around with the debug a bit, to make sure everything is correct.
- You can also try with the other attach configurations.