If using debug mode, try and force prefork MPM and fallback to worker MPM.
@@ -2930,6 +2930,9 @@ def _cmd_setup_server(command, args, options):
if options['working_directory'] not in options['python_paths']:
options['python_paths'].insert(0, options['working_directory'])
+ if options['debug_mode']:
+ options['server_mpm_variables'] = ['prefork', 'worker']
+
# Special case to check for when being executed from shiv variant
# of a zipapp application bundle. We need to work out where the
# site packages directory is and pass it with Python module search
