<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Debugging a Python Toolbox using Visual Studio Code in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/debugging-a-python-toolbox-using-visual-studio/m-p/1616528#M95895</link>
    <description>&lt;P&gt;Hi, you might be interested in hearing that we've just released the ArcGIS Pro Debugger Extension for Visual Studio Code on the Visual Studio Code Marketplace!&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://marketplace.visualstudio.com/items?itemName=Esri.arcgis-pro-debugger" target="_blank" rel="noopener"&gt;ArcGIS Pro Debugger - Visual Studio Marketplace&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;This extension allows debugging ArcGIS Pro script tools (.atbx, .pyt) using Visual Studio Code (VSC).&lt;/P&gt;&lt;P&gt;Our aim is to provide developers a seamless workflow to attach VSC to the Python process live in ArcGIS Pro. This integration allows developers to leverage VSC's native Python debugging experience while developing script tools for ArcGIS Pro.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Easily attach to ArcGIS Pro and stand-alone Python processes&lt;/LI&gt;&lt;LI&gt;Debug ArcGIS Pro Script Tools (.atbx) and Python Toolboxes (.pyt)&lt;/LI&gt;&lt;LI&gt;Debug code on the local machine or remotely on a different machine&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;BR /&gt;If you use the extension and run into any issues, you can log an issue in our public repository,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://github.com/Esri/arcgispro-vscode-debugger" target="_blank" rel="noopener"&gt;Esri/arcgispro-vscode-debugger&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Additional resources:&lt;BR /&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/get-started/debugging-python-code.htm" target="_blank" rel="noopener"&gt;Debug Python code—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 20 May 2025 16:39:44 GMT</pubDate>
    <dc:creator>HannesZiegler</dc:creator>
    <dc:date>2025-05-20T16:39:44Z</dc:date>
    <item>
      <title>Debugging a Python Toolbox using Visual Studio Code</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/debugging-a-python-toolbox-using-visual-studio/m-p/1079955#M43416</link>
      <description>&lt;P&gt;I found the &lt;A title="debugging using Visual Studio and Pycharm" href="https://pro.arcgis.com/en/pro-app/latest/arcpy/get-started/debugging-python-code.htm" target="_blank" rel="noopener"&gt;docs on using Visual Studio and PyCharm&lt;/A&gt;&amp;nbsp;but I wonder if anyone has had success with Visual Studio Code?&lt;/P&gt;&lt;P&gt;I set up launch.json and I can attach to ArcGISPro.exe but I am not sure what comes after that. I can set breakpoints in my .py file from the IDE but they are never hit.&lt;/P&gt;&lt;P&gt;I use F5 to run and wait for the status bar to go orange which indicates it's running. I must be very close, because I can see print() statement output in the IDE's Debug Console window.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BrianWilson7_1-1626479346321.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/18728i0E0AF8BDF5375866/image-size/medium?v=v2&amp;amp;px=400" role="button" title="BrianWilson7_1-1626479346321.png" alt="BrianWilson7_1-1626479346321.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I am running ArcGIS Pro 2.8 on Windows 10 using the newest VS Code.&lt;/P&gt;&lt;P&gt;If you are interested in seeing the Python code, it's here&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Wildsong/ArcGIS_Python_Template" target="_blank"&gt;https://github.com/Wildsong/ArcGIS_Python_Template&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My launch.json looks like this&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
  "version": "0.2.0",  "configurations": [
    {
      "name": "Python: Attach using Process Id",
      "type": "python",
      "request": "attach",
      "processId": "${command:pickProcess}"
    },
    {
      "name": "Python: Current File",
      "type": "python",
      "request": "launch",
      "program": "${file}",
      "console": "integratedTerminal"
    }
  ]
}&lt;/LI-CODE&gt;&lt;P&gt;Happy Friday!&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jul 2021 23:55:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/debugging-a-python-toolbox-using-visual-studio/m-p/1079955#M43416</guid>
      <dc:creator>Brian_Wilson</dc:creator>
      <dc:date>2021-07-16T23:55:54Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging a Python Toolbox using Visual Studio Code</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/debugging-a-python-toolbox-using-visual-studio/m-p/1137183#M50563</link>
      <description>&lt;P&gt;Hi Brian,&lt;/P&gt;&lt;P&gt;Did you ever find a resolution to this? I'm in the same boat currently. Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 23:20:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/debugging-a-python-toolbox-using-visual-studio/m-p/1137183#M50563</guid>
      <dc:creator>ErickPoundFDNY</dc:creator>
      <dc:date>2022-01-25T23:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging a Python Toolbox using Visual Studio Code</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/debugging-a-python-toolbox-using-visual-studio/m-p/1195232#M57666</link>
      <description>&lt;P&gt;what worked for me&lt;/P&gt;&lt;P&gt;1. run ArcGIS pro (3.0)&lt;/P&gt;&lt;P&gt;2. open vs code with the script open&amp;nbsp;&lt;/P&gt;&lt;P&gt;3. in vs code&amp;nbsp; run and Debug ,&amp;nbsp;then select&amp;nbsp; attach using process ID&amp;nbsp;&lt;/P&gt;&lt;P&gt;and select the ArcGIS pro processed&lt;/P&gt;&lt;P&gt;run the gp tool in&amp;nbsp; ArcGIS pro&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Jul 2022 05:55:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/debugging-a-python-toolbox-using-visual-studio/m-p/1195232#M57666</guid>
      <dc:creator>OrrGvili</dc:creator>
      <dc:date>2022-07-24T05:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging a Python Toolbox using Visual Studio Code</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/debugging-a-python-toolbox-using-visual-studio/m-p/1206386#M59083</link>
      <description>&lt;P&gt;Doesn't seem to work for me. It seems to attach but it runs in AGP without hitting the breakpoints.&lt;/P&gt;&lt;P&gt;I tried a couple different routes:&lt;/P&gt;&lt;P&gt;1. Debug on the tool script&lt;/P&gt;&lt;P&gt;2. Debug on the toolbox (pyt)&lt;/P&gt;&lt;P&gt;3. Removing and re-adding the toolbox.&lt;/P&gt;&lt;P&gt;I get the debug pane in VS (variables, call stack, etc) but no breakpoints. How is your toolbox laid out?&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2022 16:21:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/debugging-a-python-toolbox-using-visual-studio/m-p/1206386#M59083</guid>
      <dc:creator>ErickPoundFDNY</dc:creator>
      <dc:date>2022-08-25T16:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging a Python Toolbox using Visual Studio Code</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/debugging-a-python-toolbox-using-visual-studio/m-p/1212626#M59835</link>
      <description>&lt;P&gt;I have taken to running the tools outside AGP entirely. It has sped up development by sidestepping the 'reload toolbox' requirement. That said, I would still like to get this going if anyone finally cracks this.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 19:23:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/debugging-a-python-toolbox-using-visual-studio/m-p/1212626#M59835</guid>
      <dc:creator>ErickPoundFDNY</dc:creator>
      <dc:date>2022-09-14T19:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging a Python Toolbox using Visual Studio Code</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/debugging-a-python-toolbox-using-visual-studio/m-p/1212773#M59852</link>
      <description>&lt;P&gt;since the move to arcPro 3&amp;nbsp;&lt;BR /&gt;its not working as expected&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Sep 2022 04:31:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/debugging-a-python-toolbox-using-visual-studio/m-p/1212773#M59852</guid>
      <dc:creator>OrrGvili</dc:creator>
      <dc:date>2022-09-15T04:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging a Python Toolbox using Visual Studio Code</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/debugging-a-python-toolbox-using-visual-studio/m-p/1302982#M70558</link>
      <description>&lt;P&gt;For me it does work with debugpy breakpoints but not with visualstudio breakpoints. For using debugpy import debugpy in your python tool file (.pyt) :&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import debugpy&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;on those lines where you want the debugger to stop, call debugpy's breakpoint() method:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;debugpy.breakpoint()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then run and debug add a debug configuration that let's you pickup the Process ID of the running ArcGIS Pro application:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt; {
            "name": "Python: Attach using Process Id",
            "type": "python",
            "request": "attach",
            "processId": "${command:pickProcess}",
            "justMyCode": true
 }&lt;/LI-CODE&gt;&lt;P&gt;Start debugging, wait for the debugger to connect and then run the Python Tool in ArcGIS Pro. The debugger will stop wherever the debugpy.breakpoint() call was set.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 13:51:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/debugging-a-python-toolbox-using-visual-studio/m-p/1302982#M70558</guid>
      <dc:creator>Stefan_Schlaefli</dc:creator>
      <dc:date>2023-06-26T13:51:30Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging a Python Toolbox using Visual Studio Code</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/debugging-a-python-toolbox-using-visual-studio/m-p/1319250#M72146</link>
      <description>&lt;P&gt;I've just come across this post after searching for the solution for a while, this was the closest I got as well. I can see print commands but can't see any of the variables or watched expressions. Anyone managed to get this working in the last year?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2023 17:42:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/debugging-a-python-toolbox-using-visual-studio/m-p/1319250#M72146</guid>
      <dc:creator>AndyDixon</dc:creator>
      <dc:date>2023-08-16T17:42:21Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging a Python Toolbox using Visual Studio Code</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/debugging-a-python-toolbox-using-visual-studio/m-p/1502840#M85346</link>
      <description>&lt;P&gt;I used this blog, which helped me create a .py file that I can use with vs code to debug using the default launch.json:&lt;BR /&gt;&lt;A href="https://www.esri.com/arcgis-blog/products/arcgis-desktop/analytics/how-to-debug-python-toolboxes-in-3-easy-steps/" target="_blank"&gt;https://www.esri.com/arcgis-blog/products/arcgis-desktop/analytics/how-to-debug-python-toolboxes-in-3-easy-steps/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here are other resources that might be of interest:&lt;BR /&gt;&lt;A href="https://mfcallahan.blog/2022/10/11/configuring-vs-code-for-arcpy-arcgis-pro-development/" target="_blank"&gt;https://mfcallahan.blog/2022/10/11/configuring-vs-code-for-arcpy-arcgis-pro-development/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://desktop.arcgis.com/en/arcmap/latest/analyze/creating-tools/debugging-a-toolvalidator-class.htm" target="_blank"&gt;https://desktop.arcgis.com/en/arcmap/latest/analyze/creating-tools/debugging-a-toolvalidator-class.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/microsoft/debugpy/issues/431" target="_blank"&gt;https://github.com/microsoft/debugpy/issues/431&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2024 02:40:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/debugging-a-python-toolbox-using-visual-studio/m-p/1502840#M85346</guid>
      <dc:creator>AndresCastillo</dc:creator>
      <dc:date>2024-07-09T02:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: Debugging a Python Toolbox using Visual Studio Code</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/debugging-a-python-toolbox-using-visual-studio/m-p/1616528#M95895</link>
      <description>&lt;P&gt;Hi, you might be interested in hearing that we've just released the ArcGIS Pro Debugger Extension for Visual Studio Code on the Visual Studio Code Marketplace!&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://marketplace.visualstudio.com/items?itemName=Esri.arcgis-pro-debugger" target="_blank" rel="noopener"&gt;ArcGIS Pro Debugger - Visual Studio Marketplace&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;This extension allows debugging ArcGIS Pro script tools (.atbx, .pyt) using Visual Studio Code (VSC).&lt;/P&gt;&lt;P&gt;Our aim is to provide developers a seamless workflow to attach VSC to the Python process live in ArcGIS Pro. This integration allows developers to leverage VSC's native Python debugging experience while developing script tools for ArcGIS Pro.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Easily attach to ArcGIS Pro and stand-alone Python processes&lt;/LI&gt;&lt;LI&gt;Debug ArcGIS Pro Script Tools (.atbx) and Python Toolboxes (.pyt)&lt;/LI&gt;&lt;LI&gt;Debug code on the local machine or remotely on a different machine&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;BR /&gt;If you use the extension and run into any issues, you can log an issue in our public repository,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://github.com/Esri/arcgispro-vscode-debugger" target="_blank" rel="noopener"&gt;Esri/arcgispro-vscode-debugger&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Additional resources:&lt;BR /&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/arcpy/get-started/debugging-python-code.htm" target="_blank" rel="noopener"&gt;Debug Python code—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 20 May 2025 16:39:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/debugging-a-python-toolbox-using-visual-studio/m-p/1616528#M95895</guid>
      <dc:creator>HannesZiegler</dc:creator>
      <dc:date>2025-05-20T16:39:44Z</dc:date>
    </item>
  </channel>
</rss>

