Note that there are some explanatory texts on larger screens.

plurals
  1. POTrouble debugging C++ using Eclipse Galileo on Mac
    text
    copied!<p>I am trying to debug C++ code using Eclipse Galileo on my MacBook Pro running <a href="http://en.wikipedia.org/wiki/Mac_OS_X_Leopard" rel="nofollow noreferrer">Mac&nbsp;OS&nbsp;X&nbsp;v10.5</a> (Leopard). It's my first time trying this. I have a complicated C++ program I'd like to debug, but to test things out, I just tried to debug and step through the following:</p> <pre><code>#include &lt;iostream&gt; using namespace std; int main() { int x = 0; cout &lt;&lt; x &lt;&lt; endl; x = 54; cout &lt;&lt; x &lt;&lt; endl; return 0; } </code></pre> <p>I clicked the debug icon, told it to use <a href="http://en.wikipedia.org/wiki/GNU_Debugger" rel="nofollow noreferrer">GDB</a> (DSF) Create Process Launcher and started to step through the code. I wanted to be able to monitor the value of x, so I opened up the Variables window and watched. Initially, it was 4096 - presumably some garbage value. As soon as I hit the next line, where it had shown the value, it now shows the following error:</p> <pre><code>Failed to execute MI command: -var-update 1 var1 Error message from debugger back end: Variable object not found </code></pre> <p>I can't seem to figure this out or get around it. And a few Google searches turned up bone dry without even the hint of a lead.</p> <hr> <p><strong>Solution</strong>: As <a href="https://stackoverflow.com/users/154980/drhirsch">drhirsch</a> pointed out below, use the Standard Create Process Launcher instead of the GDB Create Process Launcher. (This is actually a workaround and not a true solution, but it worked for at least two of us.)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload