<li><aclass="backlink"title="Click to do a full-text search for this title"href="./Debugging?action=fullsearch&value=linkto%3A%22Debugging%22&context=180">Debugging</a></li>
<spanclass="anchor"id="line-2"></span><oltype="1"><li><pclass="line891"><ahref="#gamecode">Debugging Game Code</a><spanclass="anchor"id="line-3"></span><spanclass="anchor"id="line-4"></span></li></ol><pclass="line867"><spanclass="anchor"id="gamecode"></span><spanclass="anchor"id="line-5"></span>
<h3id="head-cc7cf73ce2874e17eabbe4ae489cd5a3a94c7338">Debugging Game Code</h3>
<spanclass="anchor"id="line-6"></span><pclass="line874">If you're working with the game code, you can quickly setup Visual Studio to debug your code as a regular application. There are several ways to do this, here's one of them. <spanclass="anchor"id="line-7"></span><spanclass="anchor"id="line-8"></span><pclass="line867"><strong>The following assumes you've installed Quake 4 to C:\Quake4, and the SDK to C:\Quake4_SDK</strong><spanclass="anchor"id="line-9"></span><spanclass="anchor"id="line-10"></span><oltype="1"><li><pclass="line862">Right click the <em>Game</em> project in the Solution Explorer and select Properties. <spanclass="anchor"id="line-11"></span></li><li><pclass="line862">Setup a post-build step to copy your gamex86.dll to your Quake 4 root directory; you can use the commandline <em>xcopy $(Target<ttclass="backtick"></tt>Path) c:\quake4</em>: <spanclass="anchor"id="line-12"></span><ul><listyle="list-style-type:none"><pclass="line891"><aclass="attachment"href="./Debugging?action=AttachFile&do=get&target=post-build.jpg"title="attachment:post-build.jpg">Post Build Step Settings</a><spanclass="anchor"id="line-13"></span></li></ul></li><li><pclass="line862">Configure your debugging settings. Right click the <em>Game</em> project in the Solution Explorer, select Properties, then click Debugging <spanclass="anchor"id="line-14"></span><ul><li><pclass="line891"><strong>Command</strong>: This is the command to run from the debugger. Set it to C:\Quake4\Quake4.exe <spanclass="anchor"id="line-15"></span></li><li><pclass="line891"><strong>Command Arguments</strong>: Arguments to pass to the game. Set this to <em>+set si_pure 0</em><spanclass="anchor"id="line-16"></span></li><li><pclass="line891"><strong>Working Directory</strong>: Specify where the game will be run from. Set this to C:\Quake4 <spanclass="anchor"id="line-17"></span><ul><listyle="list-style-type:none"><pclass="line891"><aclass="attachment"href="./Debugging?action=AttachFile&do=get&target=debug-settings.jpg"title="attachment:debug-settings.jpg">Debug Settings</a><spanclass="anchor"id="line-18"></span></li></ul></li></ul></li><li>Re-build your game DLL to make sure the post-build step is performed, and you should be all set hit F5 and start debugging (default settings) <spanclass="anchor"id="line-19"></span></li></ol><spanclass="anchor"id="bottom"></span></div><pid="pageinfo"class="info"lang="en"dir="ltr">Debugging (last edited 2005-12-05 20:57:54 by <spantitle="DavidDynerman @ 67.129.250.254[67.129.250.254]"><aclass="nonexistent"href="./DavidDynerman"title="DavidDynerman @ 67.129.250.254[67.129.250.254]">DavidDynerman</a></span>)</p>
<li><ahref="http://moinmoin.wikiwikiweb.de/">MoinMoin Powered</a></li><li><ahref="http://www.python.org/">Python Powered</a></li><li><ahref="http://validator.w3.org/check?uri=referer">Valid HTML 4.01</a></li>