mfussenegger / nvim-dap-python

An extension for nvim-dap, providing default configurations for python and methods to debug individual test methods or classes.
GNU General Public License v3.0
571 stars 50 forks source link

Debugging a python module #82

Closed d0nker420 closed 1 year ago

d0nker420 commented 1 year ago

Hey I'm new to using nvim-dap-python and am wondering how I should go about debugging a module in python that I typically launch via the python -m module_name command. Basically how to debug code run via the init file while retaining the path of the superseding directory.

Thanks :)

mfussenegger commented 1 year ago

You can create a :h dap-configuration entry or launch.json (:h dap-launch.json) where you set the module property. See https://github.com/microsoft/debugpy/wiki/Debug-configuration-settings for all configuration options.

d0nker420 commented 1 year ago

@mfussenegger thanks a lot, appreciate it.