# VSCode in notebook doesn't print if has error

**URL:** <https://discourse.julialang.org/t/vscode-in-notebook-doesnt-print-if-has-error/81640>\
**Category:** VS Code\
**Tags:** notebooks\
**Created:** [May 25, 2022, 10:26am UTC](https://discourse.julialang.org/t/vscode-in-notebook-doesnt-print-if-has-error/81640 "2022-05-25T10:26:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Elyco](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elyco/32/18418_2.png) [@Elyco](https://discourse.julialang.org/u/Elyco)\
**Post date:** [May 25, 2022, 10:26am UTC](https://discourse.julialang.org/t/vscode-in-notebook-doesnt-print-if-has-error/81640/1 "2022-05-25T10:26:10Z")

</div>

Hi,

When using VS Code notebook I notice the following behavior:

```julia
println("You won't see this print.")
error()

```

The cell doesn’t output the `println` command.  
This is very common practice for me while debugging.  
Even more, when I delete the error line I get

```julia
println("You won't see this print.")
# error()

You won't see this print.
You won't see this print.

```

like that the printed line was sitting there waiting for me somewhere.

Is that an issue? If so, where to post it?  
Thanks,  
Elyco

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [May 25, 2022, 11:39am UTC](https://discourse.julialang.org/t/vscode-in-notebook-doesnt-print-if-has-error/81640/2 "2022-05-25T11:39:50Z")

</div>

This is a bug and will be [fixed](https://github.com/julia-vscode/julia-vscode/commit/458ab407d64f09db12c97019494328eba403e2b1) in the next release.

The current workaround is to add a `flush(stdout)` after your print statements.

Also, please open [issues](https://github.com/julia-vscode/julia-vscode/issues/new) for things like these – if you have to ask yourself whether something is an issue, then it most likely is one (be it an actual bug or bad UX or bad documentation).

---

<div class="post-metadata">

**Author:** ![Elyco](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/elyco/32/18418_2.png) [@Elyco](https://discourse.julialang.org/u/Elyco)\
**Post date:** [May 25, 2022, 4:46pm UTC](https://discourse.julialang.org/t/vscode-in-notebook-doesnt-print-if-has-error/81640/3 "2022-05-25T16:46:48Z")

</div>

Thanks for the workaround.

I wasn’t sure where to open an issue, now it seems trivial. Still need to open an issue?

---

<div class="post-metadata">

**Author:** ![pfitzseb](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pfitzseb/32/45566_2.png) [@pfitzseb](https://discourse.julialang.org/u/pfitzseb)\
**Post date:** [May 25, 2022, 5:17pm UTC](https://discourse.julialang.org/t/vscode-in-notebook-doesnt-print-if-has-error/81640/4 "2022-05-25T17:17:47Z")

</div>

Nope, thanks.
