Clearing all outputs in the notebook via VS Code's "Clear All Outputs" button (see the image below), and making sure there are no long/heavy outputs did the trick for me.

Clearing all outputs in the notebook via VS Code's "Clear All Outputs" button (see the image below), and making sure there are no long/heavy outputs did the trick for me.

I also have the same issue with VScode and Jupyter notebook, in my case it only happens when the overall size of the notebook is large (more than 150 MB) which caused by keeping the output of the cells (in my case the high quality figures), this causes the notebook to crash and grey out all the outputs. The solution that I found so far is to clear the output, it won't crash again, there is also some solution suggested by the developers here, which suggests to remove the Code cash. I would suggest to break long notebooks to smaller notebooks, or clear the output.
Update
I frequently had this issue with my notebooks of any size. One of the solutions was to remove the code Cache on my Windows machine (for mac users you have to find the equivalent app data on your system and remove the Cache).
The easiest way to access the Cache folder is to open a run window and search the following line and delete the Cache as much as you can:
%APPDATA%\Code - Insiders\Code Cache
It helped me so far. Please let me know if it worked for you guys too or you found any other solutions.
Code greyed out with no reasons
The background of main interface became grey.
My Cell Output in VS Code while using Jupyter Notebooks has turned gray, but my code is still visible.
My Cell Output in VS Code while using Jupyter Notebooks has turned gray, but my code is still visible.
Videos
I was coding in VSC using Jupyter and I dropped my phone on my keyboard and all of my cells became gray. I'm not sure how to fix it.
I don't know if my file size is too big, or If there are too many plotly graphics in my notebook, but I can't find a way to fix it.
I've tried re-installing the regular/stable version of VSC, installing VSC-Insiders, clearing my cache (I believe I did this correctly via stack posts).
Here's a link to a screenshot of what I am seeing: https://imgur.com/a/fkfHw9r
Is this possibly because I am using plotly for all of my visuals instead of png's?
I have a similar, larger file with roughly the same number of visuals where this problem isn't occurring
I was coding in VSC using Jupyter and I dropped my phone on my keyboard and all of my cells became gray. I'm not sure how to fix it.
I don't know if my file size is too big, or If there are too many plotly graphics in my notebook, but I can't find a way to fix it.
I've tried re-installing the regular/stable version of VSC, installing VSC-Insiders, clearing my cache (I believe I did this correctly via stack posts).
Here's a link to a screenshot of what I am seeing: https://imgur.com/a/fkfHw9r
Is this possibly because I am using plotly for all of my visuals instead of png's?
I have a similar, larger file with roughly the same number of visuals where this problem isn't occurring
I watched this video on enabling debugging in the new jupyter notebooks in VSCode but it won't work for me.
For reference, I am on Ubuntu on WSL1 in VSCode 1.59.1. I've got the latest ipykernel and am using Python 3.9.5.
I try to add the setting "jupyter.experimental.debugging": true to my settings.json and the text gets greyed out and and the tooltip says
This setting can only be applied in user settings in local window or in remote settings in remote window.
Which is not helpful - I have no idea what it means.
I've tried adding this line to my json settings file (e.g. command palette, user settings (JSON)) as well as in the settings.json file in my .vscode folder at the root of the directory I am working in. Both give the same tooltip.
Does anyone know how to interpret this? Or how I can go about enabling debugging in the Jupyter notebooks in VSCode?
Generally, the output box will be grayed out only when your jupyter cache is large.
According to this issue on github, the easiest to get out of this is to delete the Cache folder.
Windows %APPDATA%\Code - Insiders\Code Cache
macOS $HOME/Library/Application Support/Code - Insiders/Code Cache
Linux $HOME/.config/Code - Insiders/Code Cache
You can also try to clear output.

Looks like you're using a formatting extention. Try turning it off or uninstalling it.

- Go to Extension
- Search "Jupyter" from Microsoft
- Click "Switch to Pre-Release Version"
- Click "Reload"
VS Code Extension
Here is your answer,
1.Just refresh your IDE and then restart your IDE . 2.INSTALL KERNEL ON YOUR IDE.
Sometimes extensions in IDE must not have hosted therefore the extensions does not work.In this case just restart your IDE and then host your extensions.