Skip to content

rximg/simply-view-image-for-python-debugging

 
 

Repository files navigation

simply-view-image-for-python-debugging

Based on the great work of john-guo, a more general version for the extension.

Features

  • Support in Jupyter notebooks

  • Support view image from expression

    • NOTE when using this feature, the expression is actually executed, so beware of side-effects Expression View
  • Support plot (matplotlib, plotly) view

    • Currently supports:
      • matplotlib.pyplot.Figure
      • matplotlib.pyplot.Axis
      • plotly Figure (saving backend is needed, see here)

    Plotting View

  • Support Tensor view: pytorch and numpy

    • numpy.ndarray is considered a tensor if it has 4 channels, or 3 channels but it does not pass as an single image. scikit-image is required for this.

Watch view

Added a watch view, for watching image/plot/tensor variables, while refreshing the image-view at each breakpoint.

  • Support custom python expressions (again, beware of side-effects)

Watch View

Q & A

  • Memory blows-up when using the extension.

    It might happen when (very) large, non-numpy array object, is being used. The solution to it is to set the restrictImageTypes setting to true (should be by default).

  • Selecting different call-stack frame does not work as expected.

    Use the command: Debug View Python: Update Frame ID.

    Why:

    I couldn't find a way to get the current frame, if it was changed by the user (again and again). So, I've added a command to force VSCode "tell" me the current frame. It's a bit hacky, but it works, I think.

About

visual studio code extension simply view the image of the image variables when debugging python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 85.9%
  • Python 12.5%
  • JavaScript 1.6%