如何远程调试
我正在编程一些东西,并且需要大多数操作系统(linux、windows、macosx)上的调试支持。
这就是程序应该做的事情: - fork 一个新程序(特定于平台的程序 - 就像 Windows 上的 adobe reader,但 Linux 上的 evince) - 监控异常(已处理和未处理) - 基于异常执行预定义的函数
所以基本上我需要某种调试器,一个我可以用来实现这一点的库。然后我会启动一个调试器,启动一个程序,并监视异常。
如果我能执行&,那就太好了。监控网络上的异常情况。假设我的程序在计算机 A 上运行并连接到计算机 B(通过 ssh、RDP 等),我会从计算机 A 在计算机 B 中启动一个新程序,并根据计算机的异常进行监视和反应B.
所以我的问题是:是否已经以 perl/python/任何库或类似的形式编写了类似的内容。如果是的话,我非常想了解一下。
为了更清楚地说明这一点:Linux 唯一的库调用(只是不支持网络部分)是 ptrace 系统调用。
I'm programming something and I need debugging support on most operating systems (linux, windows, macosx).
This is what the program is supposed to do:
- fork a new program (platform specific program - like adobe reader on windows, but evince on linux)
- monitor for exceptions (handled and unhandled)
- execute a predefined function based on the exception
So basically I need some kind of a debugger, a library which I can use to make this possible. I would then start a debugger, start a program, and monitor for the exceptions.
It would also be great if I could execute & monitor for the exceptions over the network. So let's say my program is running on computer A and is connected to computer B (via ssh, RDP, whatever) and I would start a new program in computer B from computer A, and also monitor and react based on the exceptions from the computer B.
So my question is: is anything like that already written in form of a perl/python/whatever library or something similar. If it is, I would very much like to know about it.
Just to make this more clear: the linux only library call for this (just not supporing the network part) is ptrace system call.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
gdb
有一个内置的 python debugger.pdb
gdb
There is a built in python debugger.pdb