Debugging python functions

How are folks locally debugging their python functions? using ptvsd? I see AWS’s SAM docs has a section on this, but nothing very clear on in the serveless framework docs other than some general recommendations on how to organize your code logically to make it more “testable”

Did you solve this? Im struggling with the same thing.