Debug ArcGIS Pro python tools in VS Code using Attach to Process functionality

1789
3
10-12-2022 01:26 PM
I_AM_ERROR
Occasional Contributor

It would be great to have Microsoft VS Code supported as a debugging environment for ArcGIS Pro. Python scripts and tools are currently a bit cumbersome to debug, especially if there is a need to inspect variables that run through UpdateParameters or UpdateMessages.

Ideally, we could use to VS Code to:

- Debug using Attach to Process

- Set break points in code

- Execute tools in ArcGIS Pro

- Executing is paused at breakpoints to debug/inspect variables/ step over, etc.

I see that Visual Studio is supported per documentation here, please consider officially supporting debugging in VS Code as it's quite popular in the python community.

3 Comments
mfcallahan

Upvoted - an officially supported "ArcGIS Pro debugger" VS Code extension would make all my GIS dreams come true 😃 I would love to see a workflow that allowed me to attach VS Code to a the Python environment of the running ArcGIS Pro instance, execute a script tool, and be able to hit breakpoints, step thru the code, etc. from within VS Code. Just like PyCharm and Visual Studio.

Dear Esri:

VS Code is used by 75% of the respondents to the 2022 StackOverflow survey! This would not necessarily be a niche tool, it could have a wide-reaching impact on developers. It's very likely that there a lot fewer GIS devs are using Visual Studio and PyCharm than there are using VS Code as their daily driver development environment. There is certainly precedent for something like this - are many such "Debugger" extensions available in the VS Code marketplace for a wide variety of languages/frameworks/platforms.

C'mon Esri...you're good at this type of stuff - the Adobe Suite plugins, ArcGIS for Teams, Office, etc. Y'all got tons of cool integrations with lots of things, especially from Microsoft. I know the community could develop this (and I'd love to participate in such a project) but I like staying in the Esri ecosystem if possible. And officially-supported VS Code extensions are always much higher quality.

Thanks,

A GIS dev

HannesZiegler
Status changed to: Under Consideration

You've got our attention!  We think this is a good suggestion and have entered it in our backlog.  This does not guarantee that the idea will be developed so we encourage the community to continue voting and sharing feedback which will help teams gauge user demand. 

EmikoCarrell

Where I work (Washington State Department of Natural Resources) is recommending and supporting VS Code as the standard IDE for Python development, so being able to debug ArcGIS Pro scripts as described in this request could potentially be very much appreciated by a lot of people.