使用PyDev Remote Debugger(pydevd)清除Eclipse的输出控制台?

时间:2022-04-08 20:25:30

I have these 2 lines at the beginning of my script and remote debugging works very nicely:

我的脚本开头有这两行,远程调试非常好用:

from pysrc.pydevd import settrace
settrace('localhost', stdoutToServer=True, stderrToServer=True, suspend=False)

My question is, is there a way to clear Eclipse's console every time settrace is called? I'm currently doing it manually, which gets a bit annoying.

我的问题是,每次调用settrace时,有没有办法清除Eclipse的控制台?我目前正在手动操作,这有点烦人。

1 个解决方案

#1


Unfortunately no, there's no way to do that automatically.

不幸的是,没有办法自动完成。

What you could do however is calling settrace and right afterwards do something as:

然而你可以做的是调用settrace,然后做一些事情:

print('\n'*40 + '*'*80) 

so that you know that the debug session started at that point (then maybe you wouldn't need to clear it?)

这样你就知道调试会话在那时开始了(那么你可能不需要清除它吗?)

#1


Unfortunately no, there's no way to do that automatically.

不幸的是,没有办法自动完成。

What you could do however is calling settrace and right afterwards do something as:

然而你可以做的是调用settrace,然后做一些事情:

print('\n'*40 + '*'*80) 

so that you know that the debug session started at that point (then maybe you wouldn't need to clear it?)

这样你就知道调试会话在那时开始了(那么你可能不需要清除它吗?)