In PyCharm, how to break at a line in an imported Cython extension code

前端 未结 1 635
时光说笑
时光说笑 2021-01-16 18:11

I am trying to examine the function LinearNDInterpolator invoked in the following Python code

from scipy.interpolate.interpnd import LinearNDInt         


        
相关标签:
1条回答
  • 2021-01-16 18:59

    EDIT - Sample code works for me minus commented out line that was in error

    So I tested this myself.

    Find the site-packages folder to find the scipy source files

    In powershell

    python -m site
    

    For me this folder was C:\Program Files (x86)\Python37-32\Lib\site-packages\scipy

    open the init.py file in pycharm and set your break point on the first line of code

    __all__ = ['test'] <- breakpoint there
    

    Run > Debug > Step Into My Code

    0 讨论(0)
提交回复
热议问题