How to debug
Moderator: Forum Moderators
How to debug
What is this command line? I've tried editing the properties of the shortcut, but it demands a proper path.methinks wrote:
There is certainly "WIN" button missing, we should add it to next version. No, seriously!
Run the game from the command line with the --debug option. Then right click on a tile next to enemy leader. Select option "Create Unit (debug)". Select Great Mage. Use Great Mage to fry enemy leader. Done.
Can somebody tell me how to debug? Of course, I could temp-edit my scenarios with a line to create a great mage next to the enemy...[/quote]
-
- Posts: 96
- Joined: October 5th, 2003, 10:04 pm
- Location: Barcelona
"What is this command line"
Look at what windows has done, hehe. People no longer now what a command line is. :S Well, don't worry, you are not alone there, there are millions who don't even know it.
I think on windows if you want to pass options to an executable you must enclose the full path and switches within quotes (on your shortcut):
Example: "C:\Program Files\Wesnoth\wesnoth.exe --debug"
Though it's been long since I last used windows on a regular basis, hehe.
Look at what windows has done, hehe. People no longer now what a command line is. :S Well, don't worry, you are not alone there, there are millions who don't even know it.
I think on windows if you want to pass options to an executable you must enclose the full path and switches within quotes (on your shortcut):
Example: "C:\Program Files\Wesnoth\wesnoth.exe --debug"
Though it's been long since I last used windows on a regular basis, hehe.
OK, so can someone help me to start in debug mode on a mac.
I'm using the binary distribution (i don't find all the required dev lib on SDL page, so i couldn't even compile it myself), this means the binary is embedded along with the libraries in a .app "application/folder" (not sure how i must call this thing )
I have this :
Battle For Wesnoth (Embedded).app
---Contents
------MacOS
---------Battle For Wesnoth (the binary)
------Frameworks
---------(The libraries)
------(All the data folders)
I tried to start in debug mode (i wanted to test some to-hit statistics concerning mages attacking ogres on mountains), but nothing worked.
I tried (from my terminal)
I'm using the binary distribution (i don't find all the required dev lib on SDL page, so i couldn't even compile it myself), this means the binary is embedded along with the libraries in a .app "application/folder" (not sure how i must call this thing )
I have this :
Battle For Wesnoth (Embedded).app
---Contents
------MacOS
---------Battle For Wesnoth (the binary)
------Frameworks
---------(The libraries)
------(All the data folders)
I tried to start in debug mode (i wanted to test some to-hit statistics concerning mages attacking ogres on mountains), but nothing worked.
I tried (from my terminal)
- cd to the wesnoth directory
open -a "Battle For Wesnoth (Embedded).app" --debug
-> No such file: /Jeux/Wesnoth/--debug - cd to wesnoth directory
open -a "Battle For Wesnoth (Embedded).app --debug"
-> Couldn't launch application: Battle For Wesnoth (embedded) --debug - cd to the macos directory (inside the .app)
./"Battle For Wesnoth" --debug (trying to launch directly the binary)
-> ## Component Manager: attempting to find symbols in a component alias of type (regR/carP/x!bt)
Initialized true type fonts
BEGIN: preprocessing file...
Abort
-
- Posts: 537
- Joined: September 15th, 2003, 2:54 pm
- Location: Sheffield (UK)
- Contact:
Re command lines in general...
The original 1984 Mac OS never had a command line, nor did any Mac OS up until Mac OS X. Command lines in principle only really have a benefit in certain circumstances. Often they are used to cover imperfections in other aspects of a gui-based system. There are of course some critical uses (e.g. batch processing with regular expressions).
Debugging can come under both. Many of the switch options (e.g. end of turn confirmation, speeding up movement, etc) should really be useable via the gui. In Wesnoth, as a work in progress and non-profitmaking to boot, coding the gui for all such possible changes would be a true waste of resource. Of course, adding the gui options for proven switches is important from the end user perspective.
Re SDL development libs:
All the development libraries are available from http://www.libsdl.org just search for the relevant library... e.g. sdl_image, etc. Or start from http://www.libsdl.org/projects/SDL_ttf/ and just change the end directory
Re Apple and command lines:
To their credit Apple have removed none of the power of the command line from under OS X. To start there were features missing from the gui, but that is mostly gone (still need it for renice though )
Your problem is that you need to re-specify the data path as the app must be run from the Mac OS folder so invalidating the hard-coded data path. Do a cd to the Mac OS directory, then type:
That should run fine (or at least it does on my machine...).
Good luck
The original 1984 Mac OS never had a command line, nor did any Mac OS up until Mac OS X. Command lines in principle only really have a benefit in certain circumstances. Often they are used to cover imperfections in other aspects of a gui-based system. There are of course some critical uses (e.g. batch processing with regular expressions).
Debugging can come under both. Many of the switch options (e.g. end of turn confirmation, speeding up movement, etc) should really be useable via the gui. In Wesnoth, as a work in progress and non-profitmaking to boot, coding the gui for all such possible changes would be a true waste of resource. Of course, adding the gui options for proven switches is important from the end user perspective.
Re SDL development libs:
All the development libraries are available from http://www.libsdl.org just search for the relevant library... e.g. sdl_image, etc. Or start from http://www.libsdl.org/projects/SDL_ttf/ and just change the end directory
Re Apple and command lines:
To their credit Apple have removed none of the power of the command line from under OS X. To start there were features missing from the gui, but that is mostly gone (still need it for renice though )
Your problem is that you need to re-specify the data path as the app must be run from the Mac OS folder so invalidating the hard-coded data path. Do a cd to the Mac OS directory, then type:
Code: Select all
./Battle\ For\ Wesnoth\ \(Embedded\) --debug ../
Good luck