# Debugging Julia code in a Jupyter Notebook in VS Code

**URL:** <https://discourse.julialang.org/t/debugging-julia-code-in-a-jupyter-notebook-in-vs-code/117005>\
**Category:** VS Code\
**Tags:** jupyter, debug\
**Created:** [July 13, 2024, 4:15pm UTC](https://discourse.julialang.org/t/debugging-julia-code-in-a-jupyter-notebook-in-vs-code/117005 "2024-07-13T16:15:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![daler6](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/daler6/32/13930_2.png) [@daler6](https://discourse.julialang.org/u/daler6)\
**Post date:** [July 13, 2024, 4:15pm UTC](https://discourse.julialang.org/t/debugging-julia-code-in-a-jupyter-notebook-in-vs-code/117005/1 "2024-07-13T16:15:58Z")

</div>

Hi, I am working with the debugger that comes with Julia for VS Code. This works fine for script files, but I can’t seem to figure out how to get it to work with Jupyter notebooks running Julia code. Any assistance would be greatly appreciated.

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [July 13, 2024, 5:42pm UTC](https://discourse.julialang.org/t/debugging-julia-code-in-a-jupyter-notebook-in-vs-code/117005/2 "2024-07-13T17:42:54Z")

</div>

I just finished support for this last week, it is available in the prerelease version of the extension, but not yet released to everyone.

---

<div class="post-metadata">

**Author:** ![daler6](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/daler6/32/13930_2.png) [@daler6](https://discourse.julialang.org/u/daler6)\
**Post date:** [July 14, 2024, 3:22am UTC](https://discourse.julialang.org/t/debugging-julia-code-in-a-jupyter-notebook-in-vs-code/117005/3 "2024-07-14T03:22:38Z")

</div>

Thanks David. Should I take a chance using the pre-release version? If not, when do you think the next update will occur?

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [July 14, 2024, 8:54am UTC](https://discourse.julialang.org/t/debugging-julia-code-in-a-jupyter-notebook-in-vs-code/117005/4 "2024-07-14T08:54:10Z")

</div>

If you have a deadline, stay away from the pre-release 🙂 But if you have a little time, it would be great if you could try it. Also, it is _very_ easy to go back and forth between then pre-release and the release version, so you can definitely try it and if it doesn’t work, go back to the released version.

We plan to release to the release channel once we have fixed all the bugs. Probably a few more days.

---

<div class="post-metadata">

**Author:** ![daler6](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/daler6/32/13930_2.png) [@daler6](https://discourse.julialang.org/u/daler6)\
**Post date:** [July 14, 2024, 3:22pm UTC](https://discourse.julialang.org/t/debugging-julia-code-in-a-jupyter-notebook-in-vs-code/117005/5 "2024-07-14T15:22:22Z")

</div>

I just switched to the pre-release (1.91.1). It took me a little time to find the Debug Cell option. I first tried to use the Run Active Julia file option after selecting the Debug selection for the Primary Side Bar. So, some explanation how to use this new feature would help.

Once I figured this out, I noticed a few other things:

1. When a cell runs fine, the variables do not appear in the VARIABLES section of the Primary Side Bar
2. When there is an issue, the variables appear in the VARIABLES section of the Primary Side Bar, the Exception is described, and the CALL STACK notes that the program has Paused on Execution. At that point, though, there does not seem to be an obvious way to continue. I can Pause Execution of the Cell, which closes the error message, and then correct the code. However, the cell seems to remain in an active state running an infinite loop. The only way I have found to get it to stop fully is to close the entire folder or close VSCode completely. Just closing and reopening the file or stopping the Kernel is not enough.

---

<div class="post-metadata">

**Author:** ![davidanthoff](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/davidanthoff/32/223493_2.png) [@davidanthoff](https://discourse.julialang.org/u/davidanthoff)\
**Post date:** [July 14, 2024, 4:06pm UTC](https://discourse.julialang.org/t/debugging-julia-code-in-a-jupyter-notebook-in-vs-code/117005/6 "2024-07-14T16:06:53Z")

</div>

> [@daler6](#):
>
> When a cell runs fine, the variables do not appear in the VARIABLES section of the Primary Side Bar

Could you post a screenshot of that? There are now so many different variable viewers in VS Code, I want to make sure I know which one you are seeing.

I’ll checkout the other problem, thanks for reporting!
