Debugging Julia code in a Jupyter Notebook in VS Code

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.

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

3 Likes

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

If you have a deadline, stay away from the pre-release :slight_smile: 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.

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.

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!