我经常通过在vscode调试器中绘制NumPy数组来调试python代码。 我经常花3秒钟以上的时间看一个情节。当我做vscode打印的时候 下面是长长的警告。这很烦人,因为我必须向上滚动很多 始终查看以前的调试输出。PYDEVD\u警告\u评估\u超时在哪里 变量我怎么关掉这个
为了完整起见,我在下面添加了警告,非常感谢您的帮助
Evaluating: plt.show() did not finish after 3.00s seconds. This may mean a number of things:
This evaluation is really slow and this is expected. In this case it's possible to silence this error by raising the timeout, setting the PYDEVD_WARN_EVALUATION_TIMEOUT environment variable to a bigger value.
The evaluation may need other threads running while it's running: In this case, it's possible to set the PYDEVD_UNBLOCK_THREADS_TIMEOUT environment variable so that if after a given timeout an evaluation doesn't finish, other threads are unblocked or you can manually resume all threads.
Alternatively, it's also possible to skip breaking on a particular thread by setting a
pydev_do_not_trace = True
attribute in the related threading.Thread instance (if some thread should always be running and no breakpoints are expected to be hit in it).The evaluation is deadlocked: In this case you may set the PYDEVD_THREAD_DUMP_ON_WARN_EVALUATION_TIMEOUT environment variable to true so that a thread dump is shown along with this message and optionally, set the PYDEVD_INTERRUPT_THREAD_TIMEOUT to some value so that the debugger tries to interrupt the evaluation (if possible) when this happens.
如果你想超越警告,你可以这样做:
在本文件第28.6.3点中,您可以这样做: https://docs.python.org/2/library/warnings.html#temporarily-suppressing-warnings
如果链接在将来死亡,下面是代码
您应该准备好使用简单的复制粘贴
If找到了一种方法来调整launch.json,它解决了这个问题
相关问题 更多 >
编程相关推荐