# ProgressMeter in VSCode Jupyter Notebooks

**URL:** <https://discourse.julialang.org/t/progressmeter-in-vscode-jupyter-notebooks/97133>\
**Category:** VS Code\
**Created:** [April 5, 2023, 7:58pm UTC](https://discourse.julialang.org/t/progressmeter-in-vscode-jupyter-notebooks/97133 "2023-04-05T19:58:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![liamfdoherty](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/liamfdoherty/32/24516_2.png) [@liamfdoherty](https://discourse.julialang.org/u/liamfdoherty)\
**Post date:** [April 5, 2023, 7:58pm UTC](https://discourse.julialang.org/t/progressmeter-in-vscode-jupyter-notebooks/97133/1 "2023-04-05T19:58:25Z")

</div>

I am trying to use `ProgressMeter` and `@showprogress` in VS Code inside of a Jupyter notebook. When I do, I get many progress bars printed out in succession:

 ![Screenshot 2023-04-05 at 3.56.31 PM](https://global.discourse-cdn.com/julialang/original/3X/7/c/7ca626cf157224d7362977043dc644935cb704e9.png)  
This is not what happens when I use Jupyter notebooks in the browser. There, I get one bar that fills as the task completes, so I don’t have a wall of progress that makes it annoying to scroll through. Does anybody know if there is a setting in VS Code that can fix this?

---

<div class="post-metadata">

**Author:** ![nilshg](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nilshg/32/2283_2.png) [@nilshg](https://discourse.julialang.org/u/nilshg)\
**Post date:** [April 6, 2023, 5:35am UTC](https://discourse.julialang.org/t/progressmeter-in-vscode-jupyter-notebooks/97133/2 "2023-04-06T05:35:18Z")

</div>

I don’t think there is, the notebook support in vs code is still under development both upstream and from the Julia side. If you want to for an issue check with both the Julia vs code extension repo and the upstream MS repo.

---

<div class="post-metadata">

**Author:** ![BambOoxX](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bambooxx/32/22179_2.png) [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Post date:** [April 6, 2023, 8:02am UTC](https://discourse.julialang.org/t/progressmeter-in-vscode-jupyter-notebooks/97133/3 "2023-04-06T08:02:13Z")

</div>

Does you code use some hidden `println` or equivalent, or returns something ? I had the same issue at some point, I have to check again how I solved this

---

<div class="post-metadata">

**Author:** ![liamfdoherty](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/liamfdoherty/32/24516_2.png) [@liamfdoherty](https://discourse.julialang.org/u/liamfdoherty)\
**Post date:** [April 6, 2023, 5:08pm UTC](https://discourse.julialang.org/t/progressmeter-in-vscode-jupyter-notebooks/97133/4 "2023-04-06T17:08:38Z")

</div>

Yes. This is progress from a function which returns trained neural network parameters.

---

<div class="post-metadata">

**Author:** ![danielwe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/danielwe/32/35657_2.png) [@danielwe](https://discourse.julialang.org/u/danielwe)\
**Post date:** [April 6, 2023, 9:36pm UTC](https://discourse.julialang.org/t/progressmeter-in-vscode-jupyter-notebooks/97133/5 "2023-04-06T21:36:20Z")

</div>

Try calling `ProgressMeter.ijulia_behavior(:clear)` and see if it fixes the problem.

To elaborate, ProgressMeter.jl has special handling of Jupyter notebooks because their output fields are not terminals, see [https://github.com/timholy/ProgressMeter.jl#progressmeter-with-additional-information-in-jupyter](https://github.com/timholy/ProgressMeter.jl#progressmeter-with-additional-information-in-jupyter). Perhaps it’s not detecting VS Code in the same way. I’m not familiar with the internals of the package and I don’t use VS Code, so I don’t know whether the snippet above will fix the problem, but it’s worth a try.

There’s also an issue here: [It shows repeated output in VScode · Issue #231 · timholy/ProgressMeter.jl · GitHub](https://github.com/timholy/ProgressMeter.jl/issues/231)

---

<div class="post-metadata">

**Author:** ![liamfdoherty](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/liamfdoherty/32/24516_2.png) [@liamfdoherty](https://discourse.julialang.org/u/liamfdoherty)\
**Post date:** [April 7, 2023, 11:50am UTC](https://discourse.julialang.org/t/progressmeter-in-vscode-jupyter-notebooks/97133/6 "2023-04-07T11:50:05Z")

</div>

It didn’t fix the problem, but thanks anyway!
