The debug server is a way to walk through your scipts step by step. It creates a debug window that let's you see the path your script is taking, and is useful for figuring out why something is happening, or how something works. In programming, this is similar to breakpoints. Here's how I got it set up:
- In the Toolset, go to View > Options. In the options window, go to the Script page and change the "Generate debug information" field to TRUE. If you don't do this, the debugger has nothing to work with and will stop immediately after it starts.
- In the script you want to debug, add the line SpawnScriptDebugger();
- Optionally, compile all scripts in module, just in case.
- Go to the utilities folder inside your NWN2 program directory. This is C:\Program Files\Atari\Neverwinter Nights 2\Utils by default. Find the program DebugServer.exe and launch it.
- If you are running Windows XP, the firewall will ask you to unblock this program. Click unblock and you will see the small window.
- Now launch NWN2 and go to the options menu in the game.
- Find the "Full Screen" checkbox (it's small and at the top of a list of other options), and uncheck it. You need to do this in order to see the debug window. Failure to do so could leave you stuck, while the debug windows waits for you to tell it to continue executing the script.
- Now with both windows next to each other, run your module.
When it gets to where you placed the SpawnScriptDebugger(), the game will freeze and wait for you to tell the debugger to continue. Keep clicking "Step Into" until you have finished the script. At this point play will continue as normal.
There are some other options in the debug window that I didn't play with, so experiment.
Recent comments
15 weeks 7 hours ago
15 weeks 7 hours ago
15 weeks 16 hours ago
21 weeks 4 hours ago
21 weeks 2 days ago
37 weeks 5 days ago
38 weeks 1 day ago
42 weeks 1 day ago
42 weeks 3 days ago
45 weeks 3 days ago