|
[Sponsors] |
February 6, 2014, 06:13 |
System("PAUSE") like command for Debugging
|
#1 |
Senior Member
Ashwani
Join Date: Sep 2013
Location: Hyderabad
Posts: 154
Rep Power: 13 |
Hi all,
Can anyone please suggest how while debugging the code in OpenFOAM, we can halt the simulation. I want to print some output, then have the simulation halt and then continue by pressing any key. I am working on my first code in OpenFOAM and also in C++. Thanks. |
|
February 6, 2014, 06:49 |
|
#2 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
Learn how to use GDB. See also http://www.tfd.chalmers.se/~hani/kur...ing.pdf
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
|
February 6, 2014, 11:57 |
|
#3 | |
Senior Member
Ashwani
Join Date: Sep 2013
Location: Hyderabad
Posts: 154
Rep Power: 13 |
Quote:
As the window refreshes I can't see the output. But definitely, I can use a log file which I thought now. |
||
February 6, 2014, 13:07 |
|
#4 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
Use the log file, or interactively with Ctrl+Z (general bash command to send a process to sleep). You can wake it again with the command "fg".
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
|
|
|