mirror of https://github.com/BOINC/boinc.git
Updated AppDebug (markdown)
parent
1d7d37865b
commit
ae57d1fb35
25
AppDebug.md
25
AppDebug.md
|
@ -1,5 +1,6 @@
|
||||||
# Application debugging
|
# Application testing and debugging
|
||||||
In debugging a BOINC application,
|
|
||||||
|
In developing a BOINC application,
|
||||||
you need to make sure that it interfaces properly with the BOINC client.
|
you need to make sure that it interfaces properly with the BOINC client.
|
||||||
You can do this in stages, as follows:
|
You can do this in stages, as follows:
|
||||||
|
|
||||||
|
@ -29,7 +30,7 @@ To do this:
|
||||||
* Run your app.
|
* Run your app.
|
||||||
* To suspend your app, write "\<suspend/>" to msgs.txt.
|
* To suspend your app, write "\<suspend/>" to msgs.txt.
|
||||||
You need to do this atomically, e.g. write "\<suspend/>" to another file,
|
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.
|
"cat > msgs.txt" doesn't work.
|
||||||
* Similar for \<resume/> and \<abort/>.
|
* Similar for \<resume/> and \<abort/>.
|
||||||
Verify that they all work.
|
Verify that they all work.
|
||||||
|
@ -38,7 +39,21 @@ To do this:
|
||||||
|
|
||||||
Once your application works in standalone mode,
|
Once your application works in standalone mode,
|
||||||
you can test it under the BOINC client, but without a project server.
|
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**,
|
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**,
|
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.
|
check **projects/test.test/output.txt** to verify that it worked.
|
||||||
Your app's stderr output will be somewhere in client_state.xml.
|
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.
|
If your app isn't working, there are two ways to debug it.
|
||||||
First, if you put
|
First, if you put
|
||||||
```xml
|
```xml
|
||||||
|
|
Loading…
Reference in New Issue