PyMemoryEditor uses the standard logging module to emit informational
messages from inside its scans. By default, the library is silent — a
NullHandler is attached so nothing is printed unless you opt in.
To see what the library is doing internally, attach a handler to the
PyMemoryEditor logger:
import logging
logging.basicConfig(level=logging.DEBUG)
logging.getLogger("PyMemoryEditor").setLevel(logging.DEBUG)You'll start seeing messages like:
DEBUG PyMemoryEditor: skipping region 0x7FFD0000–0x7FFD2000 (read failed)
WARNING PyMemoryEditor: partial read at 0x14010F4F4 (got 6 of 8 bytes)
| Level | When it fires |
|---|---|
DEBUG | Transient skips (pages vanished mid-scan, unreadable chunks). |
WARNING | Surprising-but-recovered conditions (partial reads, mach_vm_protect restore failure on macOS). |
You can route the logger anywhere you like — to a file, to a Qt widget, to a remote log collector:
import logging
logger = logging.getLogger("PyMemoryEditor")
handler = logging.FileHandler("memscan.log")
handler.setFormatter(logging.Formatter("%(asctime)s %(levelname)s %(message)s"))
logger.addHandler(handler)
logger.setLevel(logging.DEBUG)The GUI app exposes the same log stream in its Log Console:
| Menu | Tools → Log Console |
Toggling DEBUG verbosity in the console reveals the same messages the library sends to the Python logger.
On macOS, writing to a read-only page transparently elevates the page
protection, performs the write, and tries to restore the original
protection. If the restore step fails, the library emits a ResourceWarning
and the target page is left more permissive than it started.
import warnings
# Treat the warning as an error so you don't miss it.
warnings.filterwarnings("error", category=ResourceWarning)See Platform Notes → macOS for the details.
- [Troubleshooting](../troubleshooting.md) — common errors and how to fix them.