I've been developing with python for several years and don't recall having this issue before. When I set breakpoints at the PointsToLine_management function call, the debugger stops. When I click run, it continues all the way through the script without stopping on any other breakpoints.
I am able to step through the arcpy function line by line, but stepping out or over does not return me to my script and hit the next breakpoint.
It seems that the debugger context is not getting set back after returning from the arcpy function call.
I am using Visual Studio Code so that could be the source of the problem. Is anyone also using VS Code to write/debug python?
Same problem here. I´m using PyCharm so it seems the problem is related to the PointsToLine_management function. As a workaround, I started PointsToLine_management through multiprocessing module in a new process, and after this separate process has finished, the debugger hits the next breakpoint as expected.
Problem still exists in 2020. Using Visual Studio Enterprise to code in python. Any call to ExcelToTable or TableToExcel makes all breakpoints afterward non-functional. If I comment out those lines, the breakpoints will work again.
Could you describe why using a script tool vs toolbox tool would not work? Do you think it is because of what is going on inside the script tool rather than just that it is a script tool? I was thinking this type of issue is related to multiprocessing task bug within Esri tools, but that could be wrong.
Richard Hughes I just looked at the difference in the tools. The this was the only difference I could see on short examination.
You could experiment to see if this happens with standalone scripts I suppose, or try one of the other scripts in ArcToolbox like Add Geometry Attributes, XY table to Points, etc (witin the Data Management, Features Toolset)