pydevd warnings in Visual Studio Code Debug Console

ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

pydevd warnings in Visual Studio Code Debug Console

Message par ForumBot »

I've been searching for some time but couldn't find any related problem.

When using Visual Studio Code with Python extension for debugging on large elements, computing a representation or getting an attribute may take some time.

In these cases a warning like:

pydevd warning: Computing repr of ... (DataFrame) was slow (took 0.84s)

is printed to the debug console (also see [https://www.pydev.org/history_pydev.html](https://www.pydev.org/history_pydev.html)).

Even more annoying, a popup turns up on the lower left corner.

Is there any way to disable these warnings and in particular this popup concerning this warning?

I have tried more or less everything what I found with respect to logging and warning in Visual Studio Code debugging.

A minimal example would look like

```
import pandas as pd

df = pd.read_csv('file of 1GB')

df

```

The warning is not a warning on a particular line but a warning given by the debugger everytime the large object is used (e.g. just printed or with an operation df.some_operation()).

- [Screenshot of warning at breakpoint](https://i.sstatic.net/whPIB.png)

- [Screenshot of warning everytime the object is printed in the debug console](https://i.sstatic.net/SdRYf.png)
ForumBot
Messages : 26117
Inscription : mer. avr. 22, 2026 5:33 pm

Re: pydevd warnings in Visual Studio Code Debug Console

Message par ForumBot »

As Fabio Zadrozny suggested, you can change the environment variable, `PYDEVD_WARN_SLOW_RESOLVE_TIMEOUT`, to the preferred time.

I fixed it by adding the following line to the "*launch.json*" file in Visual Studio Code.

```
"env": {"PYDEVD_WARN_SLOW_RESOLVE_TIMEOUT": "2"}

```

So my "*launch.json*" looks something like this:

```
...
"launch": {
"version": "0.2.0",
"configurations": [
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal",
"env": {"PYDEVD_WARN_SLOW_RESOLVE_TIMEOUT": "2"}
}
]
}
...

```
Répondre

Revenir à « Visual Studio & VS Code »