jupyter-matlab-proxy icon indicating copy to clipboard operation
jupyter-matlab-proxy copied to clipboard

How to use MATLABKernel from a VSCode devcontainer?

Open worc4021 opened this issue 2 years ago • 9 comments

Hello guys!

Not so much an issue but more a question: Has anyone been able to get the jupyter kernel embedded in vscode via a devcontainer?

My attempts so far have been futile and I keep seeing

Kernel needs to be started by a Jupyter Server. Please use JupyterLab or Classic Notebook while using MATLAB Kernel for Jupyter.

Anything I am missing in princple? It works in the lab and in the notebook but refuses to connect in vscode :'(

Cheers, Manuel

worc4021 avatar Feb 23 '23 20:02 worc4021

same issue here. I think it is possible for matlab proxy working in vscode-jupyter environment.

I use vscode-jupyter to launch matlab kernal.

It returns :

Kernel needs to be started by a Jupyter Server. Please use JupyterLab or Classic Notebook while using MATLAB Kernel for Jupyter.

codingToPerfection avatar Apr 12 '23 09:04 codingToPerfection

My current workaround is to open the jupyter server from command line. Copy and paste the url into VSCode as "existing Jupyter Server" as guided here.

vani-lu avatar May 07 '23 09:05 vani-lu

My current workaround is to open the jupyter server from command line. Copy and paste the url into VSCode as "existing Jupyter Server" as guided here.

I have not tried your method. But I think it will work.

codingToPerfection avatar May 16 '23 13:05 codingToPerfection

vani-lu's workaound works just fine for me.

It would be nice if we could skip this step.

NickSebClark avatar Aug 11 '23 12:08 NickSebClark

My current workaround is to open the jupyter server from command line. Copy and paste the url into VSCode as "existing Jupyter Server" as guided here.

hi, did "jupyter variables" panel work for you? The matlab code runs, but the panel doesn't show any variables. Not sure if this is a vscode issue or jupyter-matlab-proxy issue.

andresxvar avatar Sep 27 '23 23:09 andresxvar

@andresxvar Would you please create another issue to track this question / feature request?

prabhakk-mw avatar Sep 29 '23 10:09 prabhakk-mw

Really appreciate your work here. But there's been a hiccup with it in my end. In vscode, when I install and activate the official MATLAB extension, I get problems roughly translated as "cannot run code anlysis, '~\Untitled1.ipynb' invald file extension name" from every cell. I can still run the codes as expected when connected to MATLAB Kernal, though.

And if I disable the MATLAB extension and reopen the file, matlab lauguage is not recognised and features like syntax highlightening are gone while the "plain text" code works fine. I notice that there's a MATLAB icon named Objective-C in select language mode, it can highlight sytax but not auto complete code.

Idiotabtcodes avatar May 14 '24 07:05 Idiotabtcodes

Hi @Idiotabtcodes

disable the MATLAB extension and reopen the file, matlab lauguage is not recognised and features like syntax highlightening are gone while the "plain text" code works fine. I notice that there's a MATLAB icon named Objective-C in select language mode, it can highlight sytax but not auto complete code.

This is a known limitation of with the Linter being used by the MATLAB extension for VSCode. Currently the linter only recognizes files which have ** M or MLX extensions **.

For now, I'd recommend leaving the extension turned on and ignoring these warnings.

The issue has been captured here: https://github.com/mathworks/MATLAB-extension-for-vscode/issues/88

prabhakk-mw avatar May 14 '24 08:05 prabhakk-mw

Thanks for the quick response! I suppose I can live with this.

Idiotabtcodes avatar May 14 '24 08:05 Idiotabtcodes