# Connect REPL to jupyter notebook kernel

**URL:** https://discourse.julialang.org/t/connect-repl-to-jupyter-notebook-kernel/86632
**Category:** VS Code
**Tags:** jupyter, vscode, ijulia
**Created:** [September 1, 2022, 9:21am UTC](https://discourse.julialang.org/t/connect-repl-to-jupyter-notebook-kernel/86632 "2022-09-01T09:21:02Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![daharn](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/daharn/32/27088_2.png) [@daharn](https://discourse.julialang.org/u/daharn)
#### Post date: [September 1, 2022, 9:21am UTC](https://discourse.julialang.org/t/connect-repl-to-jupyter-notebook-kernel/86632/1 "2022-09-01T09:21:02Z")

</div>

I am using the jupyter notebook Julia extension for VS Code and find it quite nice. However, when debugging my commands I often find myself reproducing my notebook steps in a script and then run them in a REPL to be able to toy around with the objects in workspace.

While the objects of the Julia Notebook are also listed on the right in the “Workspace” tile, there is no way to interact with them except for the notebook itself. Is there any way I could “attach” a REPL to the Notebook workspace?

---

<div class="post-metadata">

### Author: ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)
#### Post date: [September 1, 2022, 9:35am UTC](https://discourse.julialang.org/t/connect-repl-to-jupyter-notebook-kernel/86632/2 "2022-09-01T09:35:06Z")

</div>

You could try out [GitHub - c42f/RemoteREPL.jl: Connect a REPL to a remote Julia process](https://github.com/c42f/RemoteREPL.jl).

---

<div class="post-metadata">

### Author: ![daharn](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/daharn/32/27088_2.png) [@daharn](https://discourse.julialang.org/u/daharn)
#### Post date: [September 1, 2022, 9:59am UTC](https://discourse.julialang.org/t/connect-repl-to-jupyter-notebook-kernel/86632/3 "2022-09-01T09:59:44Z")

</div>

This works, thanks a lot! It would be a cool feature for the extension to have right off the bat, I’ll probably file a feature request, as soon as I find out where this should go. The Jupyter extension or the Julia extension?

---

<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: [September 1, 2022, 11:30am UTC](https://discourse.julialang.org/t/connect-repl-to-jupyter-notebook-kernel/86632/4 "2022-09-01T11:30:45Z")

</div>

Depends on whether you use an IJulia kernel or the built in notebook support of the Julia VSCode plugin I suppose.

---

<div class="post-metadata">

### Author: ![daharn](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/daharn/32/27088_2.png) [@daharn](https://discourse.julialang.org/u/daharn)
#### Post date: [September 1, 2022, 11:49am UTC](https://discourse.julialang.org/t/connect-repl-to-jupyter-notebook-kernel/86632/5 "2022-09-01T11:49:02Z")

</div>

> [@nilshg](#):
>
> Depends on whether you use an IJulia kernel or the built in notebook support of the Julia VSCode plugin I suppose.

The latter, I believe. I wasn’t aware there are several ways to use notebooks in VSCode. Is there a tutorial for integrating IJulia somewhere?

---

<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: [September 1, 2022, 12:05pm UTC](https://discourse.julialang.org/t/connect-repl-to-jupyter-notebook-kernel/86632/6 "2022-09-01T12:05:39Z")

</div>

If you’ve just got the VSCode jupyter extension (language agnostic) and IJulia installed, you should be able to select the IJulia kernels in VSCode.

I haven’t tried it in a while and these things move fast, but I believe using a “native” kernel from the VSCode Julia extension is the recommended way of going about this, although IJulia does have some benefits (it works the same as in the browser so is more tightly coupled with the Julia REPL session than the VSCode extension, like autocompletion of DataFrame column names)

---

<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: [September 1, 2022, 12:11pm UTC](https://discourse.julialang.org/t/connect-repl-to-jupyter-notebook-kernel/86632/7 "2022-09-01T12:11:36Z")

</div>

Actually having just written the above I tried it out and it seems like that autocompletion doesn’t work anymore, even with an IJulia kernel? Which is odd as I’d always thought IJulia works the same in a browser and VSCode…

Anyway now that I’ve installed it all I can at least show you what I meant with selecting kernels above. Here’s what things look like with both the jupyter and Julia extensions installed in VSCode:

![image](https://global.discourse-cdn.com/julialang/original/3X/a/3/a3f559cac113d8b7b8b370f4174ca93694b85983.png)

So the Julia VSCode extension has picked up all my installed Julia versions (at least those in a similar location, older Julia versions are not in \Local\Programs so are missed out), while the top four kernels are those listed in my jupyter configuration file (which gets updated if you do `]build IJulia` or `IJullia.installkernel()` in a REPL session)

---

<div class="post-metadata">

### Author: ![Joseph\_Gardi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/joseph_gardi/32/212101_2.png) [@Joseph\_Gardi](https://discourse.julialang.org/u/Joseph_Gardi)
#### Post date: [September 21, 2024, 10:43am UTC](https://discourse.julialang.org/t/connect-repl-to-jupyter-notebook-kernel/86632/8 "2024-09-21T10:43:53Z")

</div>

it would be amazing if we could debug jupyter by attaching a repl and using infiltrate in the repl.
