Prints a message pointing to platform-specific permission help text and exits the program. This function is called when a PermissionError is encountered while trying to attach to a process.
()
| 3573 | |
| 3574 | |
| 3575 | def exit_with_permission_help_text(): |
| 3576 | """ |
| 3577 | Prints a message pointing to platform-specific permission help text and exits the program. |
| 3578 | This function is called when a PermissionError is encountered while trying |
| 3579 | to attach to a process. |
| 3580 | """ |
| 3581 | print( |
| 3582 | "Error: The specified process cannot be attached to due to insufficient permissions.\n" |
| 3583 | "See the Python documentation for details on required privileges and troubleshooting:\n" |
| 3584 | "https://docs.python.org/3.14/howto/remote_debugging.html#permission-requirements\n" |
| 3585 | ) |
| 3586 | sys.exit(1) |
| 3587 | |
| 3588 | |
| 3589 | def parse_args(): |