当一个人开始调试程序时,程序是否从主内存换出(进入辅助内存)?

When one begins debugging a program, is the program swapped out of main memory (into secondary memory)?

我的教科书提出以下声明:

If a user suspects a bug in the program, he or she may debug the program by suspending its execution, examining, and modifying the program or data, and resuming execution.

在此上下文中,挂起意味着从主内存换出并换入辅助内存。

例如,当我调试一个C/Python/Java程序时,程序是否在此时换出了主存?还是我误解了作者的意思?

调试不涉及换出程序。调试中的 "suspend" 通常是由于在流中强制执行 BREAKPOINT 指令引起的。这会触发操作系统的 BREAKPOINT FAULT 处理程序。调试器和应用程序之间的实际连接取决于操作系统。

如果程序被交换到辅助存储,将无法检查其内存使用情况。