{"id":1738,"date":"2025-09-11T21:51:56","date_gmt":"2025-09-11T20:51:56","guid":{"rendered":"https:\/\/editjournal.redakt.eu\/faxmodem\/?p=1738"},"modified":"2025-10-13T10:55:50","modified_gmt":"2025-10-13T09:55:50","slug":"python-debug-library-package-pycharm","status":"publish","type":"post","link":"https:\/\/editjournal.redakt.eu\/faxmodem\/blog\/development\/python\/python-debug-library-package-pycharm\/","title":{"rendered":"Debugging a 3rd party library in Python"},"content":{"rendered":"<p>You use a 3rd party library in your Python project and at one point you want to see exactly what it does. <\/p>\n<p>For example, you want to see what Yahoo Finance API URLs does <a href=\"https:\/\/pypi.org\/project\/yahooquery\/\"><code>yahooquery<\/code><\/a> call internally. It uses a <code>_get_data()<\/code> function that uses some other function to build the URL and you just want to see it. What if there was a way to simply <code>print()<\/code> what's going on or better, see everything in a breakpoint!<\/p>\n<h2>Finding your package locally<\/h2>\n<p>Open Terminal and run:<\/p>\n<pre><code>python3 -c &quot;import yahooquery, inspect; print(yahooquery.__file__)&quot;<\/code><\/pre>\n<p>On a Mac, you ger something like:<\/p>\n<pre><code>\/Library\/Developer\/CommandLineTools\/Library\/Frameworks\/Python3.framework\/Versions\/3.13\/lib\/python3.13\/site-packages\/yahooquery\/__init__.py<\/code><\/pre>\n<p>This is where your package source is.<\/p>\n<h2>Finding your package in Azure Web App Service<\/h2>\n<p>It's likely in <code>antenv\/lib\/python3.13\/site-packages\/my-package<\/code><\/p>\n<p>(Assuming you're using Python 3.13.)<\/p>\n<h2>Debugging your package source from within PyCharm<\/h2>\n<ul>\n<li>Open <em>View<\/em> \u2192 <em>Tool windows<\/em> \u2192 <em>Project<\/em> (this is where you navigate project files)<\/li>\n<li>Expand <em>External Libraries<\/em> and look for your package under <em>site-packages<\/em><\/li>\n<li>Open the package file you want to debug and set your breakpoint<\/li>\n<\/ul>\n<p>Now when you <em>Debug<\/em> (as opposed to just <em>Run<\/em>) your script that uses the package, it will stop on that breakpoint.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You use a 3rd party library in your Python project and at one point you want to see exactly what it does. For example, you want to see what Yahoo Finance API URLs does yahooquery call internally. It uses a _get_data() function that uses some other function to build the URL and you just want&hellip; <a class=\"more-link\" href=\"https:\/\/editjournal.redakt.eu\/faxmodem\/blog\/development\/python\/python-debug-library-package-pycharm\/\">Continue reading <span class=\"screen-reader-text\">Debugging a 3rd party library in Python<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1263],"tags":[824,1261,1260,935],"class_list":["post-1738","post","type-post","status-publish","format-standard","hentry","category-python","tag-microsoft-azure","tag-pycharm","tag-pypi","tag-python","entry"],"_links":{"self":[{"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/posts\/1738","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/comments?post=1738"}],"version-history":[{"count":3,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/posts\/1738\/revisions"}],"predecessor-version":[{"id":1743,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/posts\/1738\/revisions\/1743"}],"wp:attachment":[{"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/media?parent=1738"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/categories?post=1738"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/editjournal.redakt.eu\/faxmodem\/wp-json\/wp\/v2\/tags?post=1738"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}