# Persisting the console log

**URL:** https://discourse.processing.org/t/persisting-the-console-log/15877
**Category:** p5.js
**Created:** [November 27, 2019, 1:28pm UTC](https://discourse.processing.org/t/persisting-the-console-log/15877 "2019-11-27T13:28:01Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Dandada](https://avatars.discourse-cdn.com/v4/letter/d/b77776/32.png) [@Dandada](https://discourse.processing.org/u/Dandada)
#### Post date: [November 27, 2019, 1:28pm UTC](https://discourse.processing.org/t/persisting-the-console-log/15877/1 "2019-11-27T13:28:01Z")

</div>

Is there, or can an option be added, to persist the console log in p5js after stopping a program. It would greatly help with debugging.

---

<div class="post-metadata">

### Author: ![Tiemen](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/tiemen/32/5477_2.png) [@Tiemen](https://discourse.processing.org/u/Tiemen)
#### Post date: [November 27, 2019, 1:54pm UTC](https://discourse.processing.org/t/persisting-the-console-log/15877/2 "2019-11-27T13:54:17Z")

</div>

Not sure, but perhaps you can play around with `noLoop()` to prevent the console log from constantly adding new data

---

<div class="post-metadata">

### Author: ![Dandada](https://avatars.discourse-cdn.com/v4/letter/d/b77776/32.png) [@Dandada](https://discourse.processing.org/u/Dandada)
#### Post date: [November 27, 2019, 2:36pm UTC](https://discourse.processing.org/t/persisting-the-console-log/15877/3 "2019-11-27T14:36:35Z")

</div>

Using noLoop() would help but it would still be nice if there was an option to persist the console after the program is ended.

---

<div class="post-metadata">

### Author: ![manno](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@manno](https://discourse.processing.org/u/manno)
#### Post date: [November 27, 2019, 5:17pm UTC](https://discourse.processing.org/t/persisting-the-console-log/15877/4 "2019-11-27T17:17:06Z")

</div>

In what environment do you run the program? editor.p5js or from within a ‘plain’ HTML file? I like the p5js editor for small things, but visual studio code with the proper extensions and all standard browser console and debug capabilities easily surpass it feature wise for a bit more serious efforts.

---

<div class="post-metadata">

### Author: ![Dandada](https://avatars.discourse-cdn.com/v4/letter/d/b77776/32.png) [@Dandada](https://discourse.processing.org/u/Dandada)
#### Post date: [November 27, 2019, 6:13pm UTC](https://discourse.processing.org/t/persisting-the-console-log/15877/5 "2019-11-27T18:13:54Z")

</div>

Thanks for the suggestion. I am using the editor.p5js. I am evaluating p5js to see if I could use it in a coding course for children I teach and was having an issue with a bouncing ball program I was creating. I added some console.log lines to help debug the issue but when I stopped the execution the console was clearing so I just thought the ability to persist it would be nice.

---

<div class="post-metadata">

### Author: ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)
#### Post date: [November 28, 2019, 1:16am UTC](https://discourse.processing.org/t/persisting-the-console-log/15877/6 "2019-11-28T01:16:41Z")

</div>

is this correct that you talk about the  
[https://editor.p5js.org](https://editor.p5js.org)  
online editor environment?

because p5.js sketch in a browser ( from a server environment )  
does not have a STOP ( can close the browser window )

yes, right, the online editor console is cleared on [STOP] exit()…  
and that might be a interesting feature request.

but also a big problem might be that  
if use fullscreen, your code gets stuck and need to hit the [ESC]  
so while development the many

```auto
print("function name: variable name "+variable);

```

can help but only if you see it, so  
better develop with a canvas 800x800

* * *

if some p5.js expert know how to supersede the exit()  
in a way that a log file can be “downloaded” saved first  
you could write your log into a file.  
but i have no idea how to do that.

* * *

i think some more support in this direction  
for development is a good idea,  
but possibly wait and lets check out the 1.0.x  
if it comes also with a new editor revision??

* * *

BUT for now there is a other way

 ![p5js_inspect_console](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/9/91cdb300d64a0944d66beca9cc8222e496f60f56.png)

so, while the console window in online editor is cleared already ( do a [RUN] [STOP] )  
i still see the “history” in the inspect CONSOLE  
! but only if i open that first!

---

<div class="post-metadata">

### Author: ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)
#### Post date: [December 8, 2019, 1:18am UTC](https://discourse.processing.org/t/persisting-the-console-log/15877/7 "2019-12-08T01:18:33Z")

</div>

> [@Dandada](#):
>
> I just thought the ability to persist it would be nice.

If you have not done so already, you could submit this as a feature request via “Issues”:

> **[Issues · processing/p5.js-web-editor](https://github.com/processing/p5.js-web-editor/issues)**
>
> p5.js Web Editor, officially launched! Contribute to processing/p5.js-web-editor development by creating an account on GitHub.
