Jupyter %%prun magic output not displayed properly in VS Code

801 Views Asked by At

Since very recently I have a problem where the output of %%prun is not displayed properly in VS Code Jupyter (all output is on one line instead of in a nicely formatted table).

I tried reloading the window and restarting Jupyter but the problem still appears.

What could be causing the problem?

Bug illustration

2

There are 2 best solutions below

0
Ferdinando Randisi On

The workaround I'm using at the moment is saving the %prun output to a separate file and inspecting that file.

%prun -T tmp.txt my_fn()
0
starball On

This is a bug that got fixed: The output is not displayed in tabular form by using %%prun #11443. The fix's milestone was January 2023, which has since been released, and I just tested that it works.