why does my program not work and then when I run it in debug it works from that point forward. Does this have to do with compressing programs when compiling
In order to help you with your problem you will need to give more information. What programming language are you using? What is the error you get when you run the program? Can you provide the program code at the point the error occurs?
The more information you give the better the answer you receive.
Jdre, Forgive me if I'm misunderstanding, but did you say that running the debug feature, removes the "bugs" causing your problem to go away? That's what "debugging" is supposed to do. If, however, you're asking HOW the debugger performs its "magic" well that's too broad an issue to be addressed in this forum.
Good luck to you and, again, forgive me if I misunderstood .
JuJu
Last Wiki Answer Submitted: May 7, 2009 9:37 pm by hafwhit1,145 pts.
If you live outside the United States, by submitting your email address you consent to having your personal data transferred to and processed in the United States.
I don’t think it has something to do with compression.
I have seen similar situations, but always was because of the different conditions when running the program in debug mode.
For example, depending on the programming environment, it is possible that when running in debug mode, the program executable is run from a different location (path), and thus uses different versions of other involved files (for example, INI files).
Also, depending on the specific operations the program performs, it is possible that some operations encounter errors when running fast without interruptions, but work well when you slow down the process when running step by setp in debug mode.
in your last statement about possible some operations encounter errors when running fast, would a system error be generated or would program continue processing?
That would depend of the specific operation being performed, and the error it encounters. Sometimes these are logic errors, for example a non-blocking network operation whose output is not validated before executing other related network operations. If the first operation is delayed due to network problems, the second one could be fired before the first one ends, and that could lead to some kind of error.
What programming language are you using ? can you post your code and provide a little more information ?
this is a simple RPG program that reads a file for records that have not been processed, valitdates against Item master, then calls another program to create a change record in another file then comes back to this program and updates 2 more files. the program runs without any errors but was failing to write the change record in the called program until it was put in debug.
I think you might get better results by creating a new question, but make sure you include all pertinent details and include at least RPG as a tag. Maybe I should not recommend creating a new question, but in this specific case I think it could be your best option.
I don’t think it has something to do with compression.
I have seen similar situations, but always was because of the different conditions when running the program in debug mode.
For example, depending on the programming environment, it is possible that when running in debug mode, the program executable is run from a different location (path), and thus uses different versions of other involved files (for example, INI files).
Also, depending on the specific operations the program performs, it is possible that some operations encounter errors when running fast without interruptions, but work well when you slow down the process when running step by setp in debug mode.
in your last statement about possible some operations encounter errors when running fast, would a system error be generated or would program continue processing?
That would depend of the specific operation being performed, and the error it encounters. Sometimes these are logic errors, for example a non-blocking network operation whose output is not validated before executing other related network operations. If the first operation is delayed due to network problems, the second one could be fired before the first one ends, and that could lead to some kind of error.
What programming language are you using ? can you post your code and provide a little more information ?
this is a simple RPG program that reads a file for records that have not been processed, valitdates against Item master, then calls another program to create a change record in another file then comes back to this program and updates 2 more files. the program runs without any errors but was failing to write the change record in the called program until it was put in debug.
Ok.
There are some RPG experts here in the community.
I think you might get better results by creating a new question, but make sure you include all pertinent details and include at least RPG as a tag. Maybe I should not recommend creating a new question, but in this specific case I think it could be your best option.
Juju, I don’t think debuggers perform any magic, nor they remove bugs. Loosely speaking, they just let you run the program step by step.