<p><a href="https://github.com/elextr" class="user-mention">@elextr</a> following your suggestion, it is working now. As you mentioned, GDB doesn't find the files, even after they are added to the search path with <code>dir</code>, until after the program starts running. But they're available after <code>(gdb) start</code> so that's fine.</p>
<p>Seems like this should be added to the documentation. Maybe something like</p>
<blockquote>
<p>Because most of Geany is a library, in order to use GDB, you'll need to install the version of Geany you want to debug. You can install to a different directory in order to not overwrite an existing install with <code>./configure --prefix <a directory></code>. You'll also need to tell GDB about where the source files are with GDB's <code>dir</code> command. Most source files won't be loaded until after Geany starts running, but you can run <code>(gdb) start</code> to break at the start of main and set breakpoints etc. from there.</p>
</blockquote>
<p>in the GDB section of HACKING?</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/issues/1688#issuecomment-344718552">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJzweL05YffViDfv3GmeCZLdtHd4Jks5s20mZgaJpZM4QeZvf">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ2A1r5E-rb6kXDBfbv5UagI7dBGpks5s20mZgaJpZM4QeZvf.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/issues/1688#issuecomment-344718552"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany","title":"geany/geany","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany"}},"updates":{"snippets":[{"icon":"PERSON","message":"@Ryan1729 in #1688: @elextr following your suggestion, it is working now. As you mentioned, GDB doesn't find the files, even after they are added to the search path with `dir`, until after the program starts running. But they're available after `(gdb) start` so that's fine. \r\n\r\nSeems like this should be added to the documentation. Maybe something like\r\n\r\n\u003e Because most of Geany is a library, in order to use GDB, you'll need to install the version of Geany you want to debug. You can install to a different directory in order to not overwrite an existing install with `./configure --prefix \u003ca directory\u003e`. You'll also need to tell GDB about where the source files are with GDB's `dir` command. Most source files won't be loaded until after Geany starts running, but you can run `(gdb) start` to break at the start of main and set breakpoints etc. from there.\r\n\r\nin the GDB section of HACKING?"}],"action":{"name":"View Issue","url":"https://github.com/geany/geany/issues/1688#issuecomment-344718552"}}}</script>