# PetscOptionsView
Prints the options that have been loaded. This is useful for debugging purposes. 
## Synopsis
```
#include "petscsys.h"   
PetscErrorCode PetscOptionsView(PetscOptions options, PetscViewer viewer)
```
Logically Collective on viewer


## Input Parameters

- ***options -*** options database, use NULL for default global database
- ***viewer -*** must be an `PETSCVIEWERASCII` viewer



## Options Database Key

- ***-options_view -*** Activates `PetscOptionsView()` within `PetscFinalize()`



## Note
Only the rank zero process of the `MPI_Comm` used to create view prints the option values. Other processes
may have different values but they are not printed.




## See Also
 `PetscOptionsAllUsed()`

## Level
advanced

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/objects/options.c.html#PetscOptionsView">src/sys/objects/options.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/tutorials/ex19.c.html">src/sys/tutorials/ex19.c.html</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/objects/options.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)  
