Debugging World Wind
From World Wind Wiki
(Difference between revisions)
Revision as of 22:06, 15 March 2007 (edit) Nlneilson (Talk | contribs) (New page: Debugging World Wind source code.) ← Previous diff |
Revision as of 22:45, 15 March 2007 (edit) (undo) Nlneilson (Talk | contribs) Next diff → |
||
Line 1: | Line 1: | ||
Debugging World Wind source code. | Debugging World Wind source code. | ||
+ | |||
+ | One of the options for the VS debug window (where you can monitor variables etc.) is an output console. It shows stuff that gets written to the log file, plus any Console.Write() calls. You have to run WW from inside VS to use it. | ||
+ | |||
+ | Sometimes the Output option is at the bottom of the screen, if not choose Debug->Windows->Output | ||
+ | Then turn off all breakpoints and run with Start Debugging, Start Without Debugging will not show the output. | ||
+ | |||
+ | The Output window will show a considerable amount of information including Console.Write() and Console.WriteLine(). It will even show when Threads exit without any additional code required to show this. | ||
+ | |||
+ | Debugging Plugins | ||
+ | |||
+ | If you want to debug plugins with breakpoints the plugin .cs file needs to be in the WorldWind subdirectory. If the plugin .cs file is in that plugin's directory the breakpoint will have no effect. Cut the plugin .cs file from the plugin directory and paste it into the WorldWind subdirectory. Then it may be necessary in the VS editor's Solution Explorer remove the 'plugin'.cs if it was referencing the .cs in the plugin dir. In WinExpl click on the 'plugin'.cs file in the \--\WorldWind subdirectory to open that file in the editor, then click File->move to->WorldWind. Then the breakpoint will work so you can have watches and also see what variables are in scope. |
Revision as of 22:45, 15 March 2007
Debugging World Wind source code.
One of the options for the VS debug window (where you can monitor variables etc.) is an output console. It shows stuff that gets written to the log file, plus any Console.Write() calls. You have to run WW from inside VS to use it.
Sometimes the Output option is at the bottom of the screen, if not choose Debug->Windows->Output
Then turn off all breakpoints and run with Start Debugging, Start Without Debugging will not show the output.
The Output window will show a considerable amount of information including Console.Write() and Console.WriteLine(). It will even show when Threads exit without any additional code required to show this.
Debugging Plugins
If you want to debug plugins with breakpoints the plugin .cs file needs to be in the WorldWind subdirectory. If the plugin .cs file is in that plugin's directory the breakpoint will have no effect. Cut the plugin .cs file from the plugin directory and paste it into the WorldWind subdirectory. Then it may be necessary in the VS editor's Solution Explorer remove the 'plugin'.cs if it was referencing the .cs in the plugin dir. In WinExpl click on the 'plugin'.cs file in the \--\WorldWind subdirectory to open that file in the editor, then click File->move to->WorldWind. Then the breakpoint will work so you can have watches and also see what variables are in scope.