Hi Fernando & Jesse<br><br>Myself, I tend to do my debugging the old-school way; print statements for checking variable values (make sure you use <span style="color:rgb(0,0,153)"><span style="font-family:courier new,monospace">fprintf (stderr, ...)</span></span> or <span style="color:rgb(0,0,153)"><span style="font-family:courier new,monospace">std::cerr << ...</span></span> as these are un-buffered), <span style="font-family:courier new,monospace">gdb</span> for hunting down segmentation faults and setting breakpoints, and <span style="font-family:courier new,monospace">valgrind</span> for checking memory issues; I'm pretty sure Donald is in the same boat. The <span style="font-family:courier new,monospace">TEST</span>, <span style="font-family:courier new,monospace">VAR</span> and <span style="font-family:courier new,monospace">TRACE</span> macros provided in the file lib/mrtrix.h also come in handy. <br>
<br>If you do want to use a GUI debugger (such as the one in Eclipse) it's possible, though sometimes a little finicky. Rather than trying to configure the software you are using to do the compilation, it's much easier to specify MRtrix's build script as an 'external builder'. Depending on how you normally set your LD_LIBRARY_PATH environment variable, you may also have to explicitly include the lib/ folder of MRtrix in the debugging software. The Eclipse CDT debugger is actually just an interface and interpreter for <span style="font-family:courier new,monospace">gdb</span> though, so I tend to find it more trouble than it's worth.<br>
<br>Also just a reminder, regardless of whether you use an IDE such as Eclipse for debugging or command-line debugging tools, it is essential that MRtrix be compiled in debug mode. If it is currently compiled in 'release' mode (i.e. default), you will need to run <span style="font-family:courier new,monospace">build clean</span> to remove any and all object files, binaries, and the shared library. Then when you re-compile with <span style="font-family:courier new,monospace">build</span> you must specify the <span style="font-family:courier new,monospace">-debug</span> option.<br>
<br>Best regards<br>Rob<br clear="all"><div><br>--<br><br><span style="color:rgb(255,102,0)"><b>Robert Smith</b><br>Post-Doctoral Researcher, Imaging Division</span><br><br>The Florey Institute of Neuroscience and Mental Health<br>
Melbourne Brain Centre - Austin Campus<br>245 Burgundy Street<br>Heidelberg Vic 3084<br>Ph: +61 3 9035 7128<br>Fax: +61 3 9035 7301<br><a href="http://www.florey.edu.au" target="_blank">www.florey.edu.au</a><br><span style="font-size:9pt;font-family:"Times New Roman","serif";color:red"></span></div>
<br><br><div class="gmail_quote">On Wed, Apr 10, 2013 at 9:03 PM, Fernando Garcia <span dir="ltr"><<a href="mailto:fernandogarcia.jm@gmail.com" target="_blank">fernandogarcia.jm@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
<p>Dear MRtrix Group,</p>
<p style="margin-left:0cm;text-indent:0cm"><span lang="EN-US">I start to work on fiber tracking and I would
like to use MRtrix to make some test and experiments. I was trying to compile
the code in windows following the instruction in: </span><a href="http://www.brain.org.au/software/mrtrix/install/windows.html" target="_blank"><span lang="EN-US">http://www.brain.org.au/software/mrtrix/install/windows.html</span></a><span> <span lang="EN-US">but without any success. I
tried in linux and I can make the build, however I want to use a debugging environment
for example eclipse to get a better understanding and hopefully make some test with
other algorithms. I have problems compiling the code using eclipse, and I was wondering
if somebody might help me with some instructions to do that or which debugging environment
I could use.</span></span></p>
<p style="margin-left:0cm;text-indent:0cm"><span lang="EN-US">Many thanks for your time and effort.</span></p>
<p style="margin-left:0cm;text-indent:0cm"><span lang="EN-US"></span></p>
<p style="margin-left:0cm;text-indent:0cm"><span lang="EN-US">your sincerely,</span></p>
<p style="margin-left:0cm;text-indent:0cm"><span lang="EN-US"></span></p>
<p style="margin-left:0cm;text-indent:0cm"><span lang="EN-US">Fernando Garcia</span></p>
<br>-- <br>García, Fernando<br><div>------------------------------------<br>MSc. in Informationstechnik<br>Diplom.- Elektronik Ingenieur<br>
Hochschule Mannheim - University of Applied Sciences<br>
Paul-Wittsack-Str. 10, 68163 Mannheim<br>Institut für Prozessmesstechnik und innovative Energiesysteme<br>John-Deere-Str. 85/87, 68163 Mannheim<br><div>Büro:<a value="+4962176150833">+49 0621-761508-33</a></div>
<div>Tel.: <a value="+4917625755924">+49 (0) 176 25755924</a><br></div>
Festnetz: <a value="+4962115208932">+49 0621 15208932</a><br>Mail: <a href="http://fernandogarcia.jm" target="_blank">fernandogarcia.jm</a>@<a href="http://gmail.com" target="_blank">gmail.com</a><span style="padding-right:16px;width:16px;min-height:16px"></span><span style="padding-right:16px;width:16px;min-height:16px"></span><span style="padding-right:16px;width:16px;min-height:16px"></span><span style="padding-right:16px;width:16px;min-height:16px"></span><span style="padding-right:16px;width:16px;min-height:16px"></span><span style="padding-right:16px;width:16px;min-height:16px"></span><span style="padding-right:16px;width:16px;min-height:16px"></span><span style="padding-right:16px;width:16px;min-height:16px"></span><span style="padding-right:16px;width:16px;min-height:16px"></span><span style="padding-right:16px;width:16px;min-height:16px"></span><span style="padding-right:16px;width:16px;min-height:16px"></span></div>
</div>
<br>_______________________________________________<br>
Mrtrix-discussion mailing list<br>
<a href="mailto:Mrtrix-discussion@www.nitrc.org">Mrtrix-discussion@www.nitrc.org</a><br>
<a href="http://www.nitrc.org/mailman/listinfo/mrtrix-discussion" target="_blank">http://www.nitrc.org/mailman/listinfo/mrtrix-discussion</a><br>
<br></blockquote></div><br>