# PetscSetDebugTerminal
Sets the terminal to use for debugging. 
## Synopsis
```
#include "petscsys.h"   
PetscErrorCode PetscSetDebugTerminal(const char terminal[])
```
Not Collective; No Fortran Support


## Input Parameter

- ***terminal -*** name of terminal and any flags required to execute a program.
For example xterm, "urxvt -e", "gnome-terminal -x".
On Apple MacOS you can use Terminal (note the capital T)



## Options Database Key
-debug_terminal terminal - use this terminal instead of the default




## Notes
You can start the debugger for all processes in the same GNU screen session.

mpiexec -n 4 ./myapp -start_in_debugger -debug_terminal "screen -X -S debug screen"

will open 4 windows in the session named "debug".

The default on Apple is Terminal, on other systems the default is xterm


## See Also
 `PetscSetDebugger()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/error/adebug.c.html#PetscSetDebugTerminal">src/sys/error/adebug.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/error/adebug.c)


[Index of all Sys routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
