Updated AppDebug (markdown)

David Anderson 2023-09-18 22:00:33 -07:00
parent 1d7d37865b
commit ae57d1fb35
1 changed files with 21 additions and 4 deletions

@ -1,5 +1,6 @@
# Application debugging
In debugging a BOINC application,
# Application testing and debugging
In developing a BOINC application,
you need to make sure that it interfaces properly with the BOINC client.
You can do this in stages, as follows:
@ -29,7 +30,7 @@ To do this:
* Run your app.
* To suspend your app, write "\<suspend/>" to msgs.txt.
You need to do this atomically, e.g. write "\<suspend/>" to another file,
then copy that file to msgs.txt.
then rename that file to msgs.txt.
"cat > msgs.txt" doesn't work.
* Similar for \<resume/> and \<abort/>.
Verify that they all work.
@ -38,7 +39,21 @@ To do this:
Once your application works in standalone mode,
you can test it under the BOINC client, but without a project server.
This will exercise the various forms of interaction with the client.
This will exercise the interaction with the client.
### Simple way (no XML files)
* Put a copy of the BOINC client and your application in a directory.
* Create a subdirectory ```slots/app_test```. Put your app's input files there (logical names).
* Run ```boinc --app_test foo``` where ```foo``` is the application filename.
* The client will run your application.
When it's done, the output files (and stderr.txt) will be in ```slots/app_test```.
Note: if you want, the directory can be a BOINC data directory.
In that case your application will coexist with existing jobs
(it might not run right away).
### Less simple way
This example assumes that your executable name is **test.exe**,
and that it has an input file with logical name **in** and physical name **input.txt**,
@ -82,6 +97,8 @@ When the job is done,
check **projects/test.test/output.txt** to verify that it worked.
Your app's stderr output will be somewhere in client_state.xml.
### Running under a debugger
If your app isn't working, there are two ways to debug it.
First, if you put
```xml