murdoch

Debug python script tool with IDE

Discussion created by murdoch on Jun 20, 2013
Latest reply on Jun 20, 2013 by mzcoyle
Hello!
I'm using ArcGIS 10.0 on Win7 64bit.
I'm also using PythonWin (v. 2.6.218.0).
I've also tried PyScripter (v. 2.5.3.0).

I've reviewed this help document, which seems to suggest that you can run a debugger/IDE such as PythonWin or PyScripter when testing code through the ArcToolbox interface:
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Debugging_script_tools/00150000000m000000/

The relevant section is under "Execute and debug your tool".
I've added the path to the EXE for the IDE in the Geoprocessing Options dialog for both "Editor" and "Debugger".

I have not been able to get the debugger to attach to the ArcMap process, however.  I've tried both PythonWin and PyScripter and I can edit python scripts through the ArcGIS interface (right-click on a script tool, then select "Edit").  But when I try to run a script tool in debug mode (right-click on a script tool, then select "Debug"), the script runs fine, but the IDE never launches.

I was really hoping to get this working as it would make debugging a lot easier, without having to hard-code references for parameters to get the IDE to debug in stand-alone mode.

Thanks for your help!
Andrew

Outcomes