Safe mode
NotebooksSafe mode is a code-only view of your notebook that you use to fix issues that prevent the notebook from running properly. An example of such an issue would be an infinite loop. If you have a while
loop without a yield
statement, it’s possible to construct the loop so that it infinitely repeats, never allowing anything else to happen. Safe mode is designed to let you fix that.
When you enter safe mode, a banner appears at the top of your notebook, making it clear that you are in safe mode:
![Gold banner appearing atop a notebook in Safe mode, reading 'Safe mode enabled. Use this code-only view to fix issues that might crash or hang the normal editor'.](/documentation/assets/safeModeBanner.B5ld8AZO.png)
Also, all of the cells in your notebook display their code, rather than the results of their code. No cells are executed, allowing you to edit the code and address any problem.
Here is a notebook in safe mode. Notice how all cells are showing code:
![Screen shot of a notebook in safe mode, with 'safe mode' banner up top, and each cell's code revealed (without outputs).](/documentation/assets/safeModeNotebookAfter.Buv6iXkM.png)
Here is the same notebook before safe mode was enabled:
![Screen shot of a notebook not in safe mode, with cells executed and outputs shown.](/documentation/assets/safeModeNotebookBefore.C8wW-nkW.png)
Enabling safe mode
To enable safe mode, choose View > Enable safe mode:
![Screen shot of a notebook menu, where a user navigates to Safe mode in the View options.](/documentation/assets/safeModeMenu.DTwVDUp7.png)
Alternatively, you can append /safe
to the URL for your notebook to enter and work in safe mode.