<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Script debug - offline</title><link>https://sourceforge.net/p/spacecombatgame/wiki/Script%2520debug%2520-%2520offline/</link><description>Recent changes to Script debug - offline</description><atom:link href="https://sourceforge.net/p/spacecombatgame/wiki/Script%20debug%20-%20offline/feed" rel="self"/><language>en</language><lastBuildDate>Tue, 22 Dec 2015 11:57:02 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/spacecombatgame/wiki/Script%20debug%20-%20offline/feed" rel="self" type="application/rss+xml"/><item><title>Script debug - offline modified by Thomas Schroeder</title><link>https://sourceforge.net/p/spacecombatgame/wiki/Script%2520debug%2520-%2520offline/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v19
+++ v20
@@ -105,3 +105,11 @@

 Finally, there is the log window at the bottom of the screen.
 &lt;img alt="Log window" src="https://sourceforge.net/p/spacecombatgame/wiki/Script%20debug%20-%20offline/attachment/debug_log_texts.png" width="80%"/&gt;
+
+The log window shows the last and the next 200 entries in the log file from the current position. You can change the current position with the time slider or by clicking on a line in the log window. The current position is high lighted in the log window.
+
+Lines to action and condition function are black in the log window. Additional informations are gray. The start and end of a section is red and new time stamps are green.
+
+There are several 'find' options in the context menu of the log file. You can find the next error (e.g. read access to a variable, that has not been set), the next message (output to the player, e.g. Area enter message), the next time stamp or a specified section.
+
+You can set a filter for the log too. A manual filter is defined by a start and an end. Only the log entries between them are shown. You can also filter by a section. In this case, only the log entries of the selected section are show. This is very useful, when you only want to debug game events or a single AI set.
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Thomas Schroeder</dc:creator><pubDate>Tue, 22 Dec 2015 11:57:02 -0000</pubDate><guid>https://sourceforge.net94693d187bb5e29d847b0e663786675c0fd5692a</guid></item><item><title>Script debug - offline modified by Thomas Schroeder</title><link>https://sourceforge.net/p/spacecombatgame/wiki/Script%2520debug%2520-%2520offline/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v18
+++ v19
@@ -77,7 +77,7 @@
 &lt;h2&gt;Variable window&lt;/h2&gt;

 The variable window is on the right side of the screen.
-&lt;img alt="Variable window" src="https://sourceforge.net/p/spacecombatgame/wiki/Script%20debug%20-%20offline/attachment/debug_log_variables.png" width="50%"/&gt;
+&lt;img alt="Variable window" src="https://sourceforge.net/p/spacecombatgame/wiki/Script%20debug%20-%20offline/attachment/debug_log_variables.png" width="30%"/&gt;

 All known variables are shown here. Note, the value of most variables is unknown in offline mode.
 (This window is more useful in the online mode.)
@@ -86,6 +86,21 @@

 When you step (by clicking on the 'Step' button on the lower right side), old values are shown in white and new values are shown in red.

+When you select a variable in the variable window and right click on it to open it's context menu, you can copy it's value to the clipboard. This is useful, when you have a long string in the variable and want to copy it to a text editor. (Hint: This feature is more useful, when you run the game in window mode and not in full screen mode.)
+
+&lt;h3&gt;Watchpoints&lt;/h3&gt;
+
+You may also set a watchpoint in the context menu of the variable window. Watchpoints are like breakpoints (they stop the execution of the script). They work not on a function but on a variable. Open the context menu of the variable window.
+&lt;img alt="Watchpoint window" src="https://sourceforge.net/p/spacecombatgame/wiki/Script%20debug%20-%20offline/attachment/debug_watchpoint.png" width="30%"/&gt;
+
+In this dialog you can select the options for the watchpoint.
+
+When you created the context menu on a variable, then the name is set in the dialog already. Otherwise you have to enter the variable name. You may also click the 'Scan' button to scan the whole log file and select a variable from the list.
+
+You may select several options for the watchpoint. Should it break on every change of the variable? Or should it break, when the value meets a defined condition. You may also restrict the watchpoint to a defined object. This is useful, when you have several objects with the same AI script (and therefore the same variables).
+
+After setting all watchpoints, you can click on the 'Continue' button on the left lower side. Now the debugger scans through the log file (starting at the current position) and stops at the next watchpoint, that matches the defined condition (or at the end of the recording).
+
 &lt;h2&gt;Log window&lt;/h2&gt;

 Finally, there is the log window at the bottom of the screen.
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Thomas Schroeder</dc:creator><pubDate>Tue, 22 Dec 2015 09:43:07 -0000</pubDate><guid>https://sourceforge.net2e9e26f652320a36e4fa37d4de529064f97332ec</guid></item><item><title>Script debug - offline modified by Thomas Schroeder</title><link>https://sourceforge.net/p/spacecombatgame/wiki/Script%2520debug%2520-%2520offline/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v17
+++ v18
@@ -73,3 +73,20 @@
 You may set more than one restriction at the same time. So, you can set a breakpoint, that is restricted to a defined object AND is only active in a defined section.

 After setting all breakpoints, you can click on the 'Continue' button on the left lower side. Now the debugger scans through the log file (starting at the current position) and stops at the next breakpoint, that matches the defined condition (or at the end of the recording).
+
+&lt;h2&gt;Variable window&lt;/h2&gt;
+
+The variable window is on the right side of the screen.
+&lt;img alt="Variable window" src="https://sourceforge.net/p/spacecombatgame/wiki/Script%20debug%20-%20offline/attachment/debug_log_variables.png" width="50%"/&gt;
+
+All known variables are shown here. Note, the value of most variables is unknown in offline mode.
+(This window is more useful in the online mode.)
+
+The debugger checks the last and the next 200 entries from the current position for informations on variables. When there are variables set to a value in the past, these values are shown in the variable window. When variables are set in the future, the windows shows the variable name and '???' as value.
+
+When you step (by clicking on the 'Step' button on the lower right side), old values are shown in white and new values are shown in red.
+
+&lt;h2&gt;Log window&lt;/h2&gt;
+
+Finally, there is the log window at the bottom of the screen.
+&lt;img alt="Log window" src="https://sourceforge.net/p/spacecombatgame/wiki/Script%20debug%20-%20offline/attachment/debug_log_texts.png" width="80%"/&gt;
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Thomas Schroeder</dc:creator><pubDate>Tue, 22 Dec 2015 09:25:57 -0000</pubDate><guid>https://sourceforge.net89b4f6c813ea7223705e3a41d4004a20ec61294d</guid></item><item><title>Script debug - offline modified by Thomas Schroeder</title><link>https://sourceforge.net/p/spacecombatgame/wiki/Script%2520debug%2520-%2520offline/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v16
+++ v17
@@ -34,6 +34,10 @@

 Now let's have a look at the debug windows.

+&lt;h2&gt;Time slider&lt;/h2&gt;
+
+The time slider is the wide window in the middle. You can move through the log file by moving the slider.
+
 &lt;h2&gt;Script window&lt;/h2&gt;

 On the left side is the script window. After loading a log file, it should show a script file.
@@ -56,6 +60,16 @@
 &lt;h3&gt;Conditional breakpoints&lt;/h3&gt;

 Right click on a function to open the context menu and select 'Set conditional breakpoint'  to create a conditional breakpoint here. (You can remove this breakpoint with the context menu too.) This dialog will appear:
-&lt;img alt="Conditional breakpoint dialog" src="https://sourceforge.net/p/spacecombatgame/wiki/Script%20debug%20-%20offline/attachment/debug_cond_brkpt.png" width="60%"/&gt;
+&lt;img alt="Conditional breakpoint dialog" src="https://sourceforge.net/p/spacecombatgame/wiki/Script%20debug%20-%20offline/attachment/debug_cond_brkpt.png" width="50%"/&gt;
+
+Here you can set several options for the breakpoint.
+
+You may restrict the breakpoint to a special object in the mission. This is useful, when several object have the same AI script, but you want to debug only one of them. Set the checkbox and enter the objects name (exact spelling, case sensitive). You may also click the 'Scan' button. Then, the log file is scanned for all object names and you can select one of them (so you avoid spelling errors).
+
+You can also restrict the breakpoint to a section. Assume you have a campaign with several missions. In each of them is an object, that has the same AI script. Now, you want to have the breakpoint active in mission 3 only. So, simply restrict the breakpoint to mission 3. Set the checkbox, click the 'Scan' button and select the section.
+
+Finally, you may also restrict the breakpoint to a defined time span. Set start and/or end time stamp. Leave the boxes empty for no limit.
+
+You may set more than one restriction at the same time. So, you can set a breakpoint, that is restricted to a defined object AND is only active in a defined section.

 After setting all breakpoints, you can click on the 'Continue' button on the left lower side. Now the debugger scans through the log file (starting at the current position) and stops at the next breakpoint, that matches the defined condition (or at the end of the recording).
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Thomas Schroeder</dc:creator><pubDate>Tue, 22 Dec 2015 09:16:23 -0000</pubDate><guid>https://sourceforge.net5dcb7be70360f8fcaf95ab45f691fe799e043cb5</guid></item><item><title>Script debug - offline modified by Thomas Schroeder</title><link>https://sourceforge.net/p/spacecombatgame/wiki/Script%2520debug%2520-%2520offline/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v15
+++ v16
@@ -37,7 +37,7 @@
 &lt;h2&gt;Script window&lt;/h2&gt;

 On the left side is the script window. After loading a log file, it should show a script file.
-&lt;img alt="Script debug screen filled" src="https://sourceforge.net/p/spacecombatgame/wiki/Script%20debug%20-%20offline/attachment/debug_log_script.png" width="60%"/&gt;
+&lt;img alt="Script window" src="https://sourceforge.net/p/spacecombatgame/wiki/Script%20debug%20-%20offline/attachment/debug_log_script.png" width="60%"/&gt;

 You see the script file name in the header of the window. There is some high lighting of the script file:
 &lt;ul&gt;
@@ -48,3 +48,14 @@
 &lt;/ul&gt;

 When you move the mouse cursor over a action/condition function, the function gets a violett background color. When you now open the context menu (right click), there are some options for the selected function (e.g. set breakpoint). Active breakpoints are shown with a dark red background color of the function. The current step position is indicated by a red background color of the function.
+
+&lt;h3&gt;Breakpoints&lt;/h3&gt;
+
+Right click on a function to open the context menu and select 'Set breakpoint'  to create a breakpoint here. (You can remove this breakpoint with the context menu too.) After setting all breakpoints, you can click on the 'Continue' button on the left lower side. Now the debugger scans through the log file (starting at the current position) and stops at the next breakpoint (or at the end of the recording).
+
+&lt;h3&gt;Conditional breakpoints&lt;/h3&gt;
+
+Right click on a function to open the context menu and select 'Set conditional breakpoint'  to create a conditional breakpoint here. (You can remove this breakpoint with the context menu too.) This dialog will appear:
+&lt;img alt="Conditional breakpoint dialog" src="https://sourceforge.net/p/spacecombatgame/wiki/Script%20debug%20-%20offline/attachment/debug_cond_brkpt.png" width="60%"/&gt;
+
+After setting all breakpoints, you can click on the 'Continue' button on the left lower side. Now the debugger scans through the log file (starting at the current position) and stops at the next breakpoint, that matches the defined condition (or at the end of the recording).
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Thomas Schroeder</dc:creator><pubDate>Tue, 22 Dec 2015 09:01:34 -0000</pubDate><guid>https://sourceforge.net7a40450d35c21b02f5a1726e75622a641dee57bb</guid></item><item><title>Script debug - offline modified by Thomas Schroeder</title><link>https://sourceforge.net/p/spacecombatgame/wiki/Script%2520debug%2520-%2520offline/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v14
+++ v15
@@ -1,7 +1,9 @@
 The basic concept of the offline debugging is to create a debug log while playing and analyze it afterwards.

 Wrong side? Go back to [Script debug].
-# Record
+
+&lt;h1&gt;Record&lt;/h1&gt;
+
 First, start the game with parameter '-d'. (When you installed the game on a windows system, there should be a Link named 'SpaceCombat Debug' in the start menu.) This starts the game in Debug mode with the debug menu.

 You should see this screen.
@@ -15,7 +17,9 @@
 Now, the mission runs and all scrip actions are recorded to a file ('debugLog.dat'). You should quickly do the actions, you want to debug, because the file grows rapidly. To finish the record, simply exit the game.

 Now you have a record file of all script actions.
-# Analyze
+
+&lt;h1&gt;Analyze&lt;/h1&gt;
+
 Again, start the game with parameter '-d' and click on 'Debug' to open the script debug screen.
 &lt;img alt="Script debug screen" src="https://sourceforge.net/p/spacecombatgame/wiki/Script%20debug%20-%20offline/attachment/debug_screen.png" width="80%"/&gt;

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Thomas Schroeder</dc:creator><pubDate>Tue, 22 Dec 2015 08:53:57 -0000</pubDate><guid>https://sourceforge.net58e4a87f125ac23c81a45ef546a6bfe079865975</guid></item><item><title>Script debug - offline modified by Thomas Schroeder</title><link>https://sourceforge.net/p/spacecombatgame/wiki/Script%2520debug%2520-%2520offline/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v13
+++ v14
@@ -29,7 +29,9 @@
 Note, you may decode a debug log file to plain text. Then, you are able to check the data in a simple text editor. To do this, open the context menu (when a log file has been loaded), and select 'Decode log file to text'. Then, a text file 'debugLog.txt' is created. Be warned, these files are getting huge. Not all text editor may open them.

 Now let's have a look at the debug windows.
+
 &lt;h2&gt;Script window&lt;/h2&gt;
+
 On the left side is the script window. After loading a log file, it should show a script file.
 &lt;img alt="Script debug screen filled" src="https://sourceforge.net/p/spacecombatgame/wiki/Script%20debug%20-%20offline/attachment/debug_log_script.png" width="60%"/&gt;

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Thomas Schroeder</dc:creator><pubDate>Tue, 22 Dec 2015 08:52:10 -0000</pubDate><guid>https://sourceforge.net49deb33dc0734d0d98914534d7e88b9a171824db</guid></item><item><title>Script debug - offline modified by Thomas Schroeder</title><link>https://sourceforge.net/p/spacecombatgame/wiki/Script%2520debug%2520-%2520offline/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v12
+++ v13
@@ -29,8 +29,7 @@
 Note, you may decode a debug log file to plain text. Then, you are able to check the data in a simple text editor. To do this, open the context menu (when a log file has been loaded), and select 'Decode log file to text'. Then, a text file 'debugLog.txt' is created. Be warned, these files are getting huge. Not all text editor may open them.

 Now let's have a look at the debug windows.
-Script window
--------------
+&lt;h2&gt;Script window&lt;/h2&gt;
 On the left side is the script window. After loading a log file, it should show a script file.
 &lt;img alt="Script debug screen filled" src="https://sourceforge.net/p/spacecombatgame/wiki/Script%20debug%20-%20offline/attachment/debug_log_script.png" width="60%"/&gt;

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Thomas Schroeder</dc:creator><pubDate>Tue, 22 Dec 2015 08:51:37 -0000</pubDate><guid>https://sourceforge.net4c622359211df125c6b60dbc37bbe7cbb4a15cd3</guid></item><item><title>Script debug - offline modified by Thomas Schroeder</title><link>https://sourceforge.net/p/spacecombatgame/wiki/Script%2520debug%2520-%2520offline/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Thomas Schroeder</dc:creator><pubDate>Tue, 22 Dec 2015 08:50:41 -0000</pubDate><guid>https://sourceforge.net93c46b716bde3e36cd4d6f1d76502677486a8392</guid></item><item><title>Script debug - offline modified by Thomas Schroeder</title><link>https://sourceforge.net/p/spacecombatgame/wiki/Script%2520debug%2520-%2520offline/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v10
+++ v11
@@ -26,8 +26,20 @@
 Now the windows are filled with data.
 &lt;img alt="Script debug screen filled" src="https://sourceforge.net/p/spacecombatgame/wiki/Script%20debug%20-%20offline/attachment/debug_screen_filled.png" width="80%"/&gt;

-Now let's have a look at the windows.
+Note, you may decode a debug log file to plain text. Then, you are able to check the data in a simple text editor. To do this, open the context menu (when a log file has been loaded), and select 'Decode log file to text'. Then, a text file 'debugLog.txt' is created. Be warned, these files are getting huge. Not all text editor may open them.
+
+Now let's have a look at the debug windows.
 Script window
 -------------
 On the left side is the script window. After loading a log file, it should show a script file.
 &lt;img alt="Script debug screen filled" src="https://sourceforge.net/p/spacecombatgame/wiki/Script%20debug%20-%20offline/attachment/debug_log_script.png" width="60%"/&gt;
+
+You see the script file name in the header of the window. There is some high lighting of the script file:
+&lt;ul&gt;
+ &lt;li&gt;XML tags are light green&lt;/li&gt;
+ &lt;li&gt;XML comments are green&lt;/li&gt;
+ &lt;li&gt;Action and condition functions are blue&lt;/li&gt;
+ &lt;li&gt;Everythign else is white&lt;/li&gt;
+&lt;/ul&gt;
+
+When you move the mouse cursor over a action/condition function, the function gets a violett background color. When you now open the context menu (right click), there are some options for the selected function (e.g. set breakpoint). Active breakpoints are shown with a dark red background color of the function. The current step position is indicated by a red background color of the function.
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Thomas Schroeder</dc:creator><pubDate>Tue, 22 Dec 2015 08:49:47 -0000</pubDate><guid>https://sourceforge.net3e4dbcfe51796bec1b5bef5537e772c35a60ff77</guid></item></channel></rss>