CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   System("PAUSE") like command for Debugging (https://www.cfd-online.com/Forums/openfoam-programming-development/129482-system-pause-like-command-debugging.html)

AshwaniAssam February 6, 2014 05:13

System("PAUSE") like command for Debugging
 
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.:)

akidess February 6, 2014 05:49

Learn how to use GDB. See also http://www.tfd.chalmers.se/~hani/kur...ing.pdf‎

AshwaniAssam February 6, 2014 10:57

Quote:

Originally Posted by akidess (Post 473710)

Thank you for your reply. Actually I was asking for someway to pause the output window, after a desired variable in the code is printed.
As the window refreshes I can't see the output. But definitely, I can use a log file which I thought now.

akidess February 6, 2014 12:07

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".


All times are GMT -4. The time now is 00:02.