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

"repr was slow" warning is modal in Visual Studio #981

Closed
vsfeedback opened this issue Jul 6, 2022 · 12 comments
Closed

"repr was slow" warning is modal in Visual Studio #981

vsfeedback opened this issue Jul 6, 2022 · 12 comments
Labels
bug Something isn't working external The issue is caused by external component interacting with debugpy
Milestone

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


[regression] [worked-in:17.2.5]
Python Coding.
When I try to inspect a var by hovering my cursor over the var name in the edit window (something like a breakpoint used). Previously, I got a nice text box with var info, but now, I also get an annoying window (tittle: Microsoft Visual Studio, content: pydevd warning:Computing repr of datas (list)was slow (took 0.17s) ).
I must close it before returning to the edit window.
Could you tell me how to disable it?
I realy do not remember what I have done to cause this problem.

ps. I uploaded the screenshot via Additional Files.


Original Comments

Feedback Bot on 6/23/2022, 11:07 PM:

(private comment, text removed)

Feedback Bot on 6/23/2022, 11:07 PM:

(private comment, text removed)


Original Solutions

(no solutions)

@judej
Copy link

judej commented Jul 7, 2022

Thanks for the report. Here is the warning that shows up. This is not actionable and we should look at NOT showing this.

image

@judej judej added bug Something isn't working and removed needs triage labels Jul 7, 2022
@int19h
Copy link
Contributor

int19h commented Jul 12, 2022

Apparently this is what VS does with an "output" event from the debug adapter with "category": "important". A modal dialog is kind of a strange behavior given that it is an event that's inherently async (and doesn't require confirmation). Anyway, it looks like we need to dial the severity down to avoid this.

@int19h int19h transferred this issue from microsoft/PTVS Jul 12, 2022
@int19h int19h self-assigned this Jul 12, 2022
@int19h int19h added this to the Dev 17.x milestone Jul 12, 2022
@fabioz
Copy link
Collaborator

fabioz commented Jul 13, 2022

It's possible to customize the timeout for the warning (so, you can put a big timeout to disable it).

This can be done through an environment variable:

Something as:

"PYDEVD_WARN_SLOW_RESOLVE_TIMEOUT" : "0.5"

Would set the timeout to 0.5 seconds. The current value is 0.15 seconds (maybe we could up it a bit -- it was kept slow because this has a direct effect on the responsiveness of the debugger -- before that was implemented there were complains about the debugger not responding when the issue is really that computing a repr of some variable is slow and it's not something that the debugger can control).

As a note, I haven't seen that as a dialog with confirmation so far (in fact, I remember that it was shown as a pop-up in the lower right corner which would fade out after a while). Is this a new thing in VSCode?

@int19h
Copy link
Contributor

int19h commented Jul 13, 2022

That's the way it's handled by VS as opposed to VSCode.

@fabioz
Copy link
Collaborator

fabioz commented Jul 13, 2022

Oh, I missed this was on VS. Got it.

@int19h int19h changed the title Python Coding, HOW TO Disable Pydevd waring? "repr was slow" warning is modal in Visual Studio Jul 13, 2022
int19h pushed a commit to int19h/debugpy that referenced this issue Jul 13, 2022
@int19h int19h added the external The issue is caused by external component interacting with debugpy label Jul 14, 2022
@MarkKotwicz
Copy link

How do we add "PYDEVD_WARN_SLOW_RESOLVE_TIMEOUT" : "0.5"?
I tried adding it as an environmental variable under the project properties but that didn't work.

@yushaodong
Copy link

no solution here

@yushaodong
Copy link

The bug still exists

@fabioz
Copy link
Collaborator

fabioz commented Sep 8, 2022

"PYDEVD_WARN_SLOW_RESOLVE_TIMEOUT" : "0.5" needs to be added on the env in the launch configuration.

-- another option is adding it in your system environment so that you don't need to add it to each new launch -- note that in this case you need to restart VSCode for it to pick that environment variable.

@MarkKotwicz
Copy link

I'm using Visual Studio Community so I'm not sure if the 'env' launch configuration is applicable. Adding it to my system variables worked though. Thanks.

@int19h int19h removed their assignment Sep 27, 2022
@TernencezzZ
Copy link

I have tried this.,but the bug still exists.

@judej
Copy link

judej commented Jan 19, 2023

Closing issue in this repo since the work is in VS Debugger adapter host repo. An issue has been created there: microsoft/VSDebugAdapterHost#24

@judej judej closed this as completed Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working external The issue is caused by external component interacting with debugpy
Projects
None yet
Development

No branches or pull requests

7 participants