Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The output is not displayed in tabular form by using %%prun #11443

Closed
ydmykr opened this issue Sep 26, 2022 · 8 comments
Closed

The output is not displayed in tabular form by using %%prun #11443

ydmykr opened this issue Sep 26, 2022 · 8 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug notebook-output verified Verification succeeded
Milestone

Comments

@ydmykr
Copy link

ydmykr commented Sep 26, 2022

%%prun
print("hello")

image

The output is very messy, not formatted or presented in tabular form.

@ydmykr ydmykr added the bug Issue identified by VS Code Team member as probable bug label Sep 26, 2022
@github-actions github-actions bot added the triage-needed Issue needs to be triaged label Sep 26, 2022
@amunger amunger added notebook-output and removed triage-needed Issue needs to be triaged labels Sep 26, 2022
@amunger
Copy link
Contributor

amunger commented Sep 26, 2022

thanks for the issue. Interesting to note that jupyter notebooks puts the output in a unique location:

image

@DonJayamanne
Copy link
Contributor

This is similar to the issue with HTML outputs not being aligned properly and not using monospaced font.
I found that using display: block; white-space:pre-wrap;font-family: <some mono space like terminal font> fixes this.

TLDR: I think we should re-visit the fonts used in the outputs, and must use a mono spaced font at least in stdout/stderr outputs, after all its output coming from a terminal.
@rebornix /cc

@ydmykr
Copy link
Author

ydmykr commented Sep 27, 2022

display: block; white-space:pre-wrap;font-family: <some mono space like terminal font>

I‘m so sorry that I don't quite understand this code, it looks like something used in css. How can I place them in jupyter?

@DonJayamanne
Copy link
Contributor

@ydmykr please ignore that comment, it was meant for us (internal notes for the extension maintainers).

@robna
Copy link

robna commented Oct 12, 2022

maybe it is obvious to you but just in case:
the same occurs for the line magic %prun

@DonJayamanne do you have a workaround that could be applied from the user side, while it is not correctly formatted automatically? Would really appreciate!

@RomanCast
Copy link

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()

Thanks for looking into this !

@DonJayamanne DonJayamanne added this to the January 2023 milestone Dec 30, 2022
@DonJayamanne
Copy link
Contributor

@rebornix your new changes seems to have fixed this issue, 👍🏾
I'm closing this as fixed in the latest vscode insiders version.
Screenshot 2022-12-30 at 14 40 34

@roblourens roblourens added the verified Verification succeeded label Jan 26, 2023
@starball5
Copy link

Related on Stack Overflow: Jupyter %%prun magic output not displayed properly in VS Code

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug notebook-output verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

8 participants