benfred / py-spy

Sampling profiler for Python programs
MIT License
12.89k stars 431 forks source link

Add custom error message for use of `--native` on unsupported platforms #700

Closed zanieb closed 1 month ago

zanieb commented 1 month ago

e.g.,

❯ cargo run -q -- record --native --pid 123
Collecting stack traces from native extensions (`--native`) is not supported on your platform.

instead of "unrecognized flag"

Closes https://github.com/benfred/py-spy/issues/646 — attempting to address the confusion here.