# String is not showing up in debug console

**URL:** <https://forum.code.org/t/string-is-not-showing-up-in-debug-console/32540>\
**Category:** Coding and Debugging Help\
**Created:** [April 4, 2020, 1:51pm UTC](https://forum.code.org/t/string-is-not-showing-up-in-debug-console/32540 "2020-04-04T13:51:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sheila\_lynch](https://avatars.discourse-cdn.com/v4/letter/s/e9bcb4/32.png) [@sheila\_lynch](https://forum.code.org/u/sheila_lynch)\
**Post date:** [April 4, 2020, 1:51pm UTC](https://forum.code.org/t/string-is-not-showing-up-in-debug-console/32540/1 "2020-04-04T13:51:35Z")

</div>

> **[Check out what I made](https://studio.code.org/projects/gamelab/deHV6t4nrjnSHZqZttNMFYLNW8lQK0kOb1kMhsOTALg/view)**
>
> I wrote the code myself with Code.org

My son put the console.log command in to test if the program is running. However, it didn’t show in the debug console. But he doesn’t think he made an error in the code. Please let me know if there’s any further information needed to help.

---

<div class="post-metadata">

**Author:** ![melynn](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/melynn/32/4925_2.png) [@melynn](https://forum.code.org/u/melynn)\
**Post date:** [April 4, 2020, 5:29pm UTC](https://forum.code.org/t/string-is-not-showing-up-in-debug-console/32540/2 "2020-04-04T17:29:30Z")

</div>

Hi @sheila_lynch,

The error is in the “return 0;” line. If you remove it, it runs pretty well but does seem to skip some of the slides. I had better luck with the traditional counter pattern of slides=slides+1 OR (slides+=1).

Not sure what was desired with the return 0; line? Perhaps he can achieve his desired results another way?

Hope that helps!  
Michelle

---

<div class="post-metadata">

**Author:** ![sheila\_lynch](https://avatars.discourse-cdn.com/v4/letter/s/e9bcb4/32.png) [@sheila\_lynch](https://forum.code.org/u/sheila_lynch)\
**Post date:** [April 4, 2020, 7:31pm UTC](https://forum.code.org/t/string-is-not-showing-up-in-debug-console/32540/3 "2020-04-04T19:31:33Z")

</div>

Thanks–this got him past that problem. Now he says he changed the slide function 2 to make a sprite visible, and now it’s skipping over slide 2. A test showed that it’s not skipping slide 2, but going over it very fast.

---

<div class="post-metadata">

**Author:** ![mwood](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/mwood/32/4941_2.png) [@mwood](https://forum.code.org/u/mwood)\
**Post date:** [April 6, 2020, 12:34am UTC](https://forum.code.org/t/string-is-not-showing-up-in-debug-console/32540/4 "2020-04-06T00:34:34Z")

</div>

Have him look at “keyWentDown” instead of “keyDown” The “keyDown” can be triggered repeatedly by holding the key down where as “keyWentDown” should only trigger once each time you press the key.

Hope that helps a little.

Mike
