Set default start_with_request to yes and remove the "default" option - #34
Conversation
| #endif | ||
|
|
||
| static const char *xdebug_start_with_request_types[5] = { "", "default", "yes", "no", "trigger" }; | ||
| static const char *xdebug_start_with_request_types[5] = { "", "yes", "no", "trigger" }; |
| if (trigger_name) { | ||
| xdebug_log(XLOG_CHAN_CONFIG, XLOG_INFO, "Trigger value for 'XDEBUG_TRIGGER' not found, falling back to '%s'", trigger_name); | ||
| trigger_value = xdebug_lib_find_in_globals(trigger_name, &found_in_global); | ||
| } | ||
|
|
||
| /* Also try PHP_DEBUGGER_SESSION alias */ | ||
| if (!trigger_value && XDEBUG_MODE_IS(XDEBUG_MODE_STEP_DEBUG) && (for_mode == XDEBUG_MODE_STEP_DEBUG)) { | ||
| if (!trigger_value) { | ||
| trigger_name = "PHP_DEBUGGER_SESSION"; | ||
| trigger_value = xdebug_lib_find_in_globals(trigger_name, &found_in_global); | ||
| } |
There was a problem hiding this comment.
These conditions can be simplified as I undersand, because trigger_name is always set, right?
| /* Returns 1 if the mode is 'trigger', or 'default', where the default mode for | ||
| * a feature is to trigger. Does not check whether a trigger is present. */ | ||
| int xdebug_lib_start_if_mode_is_trigger(int for_mode) | ||
| int xdebug_lib_start_if_mode_is_trigger() |
2f857a7 to
91627a0
Compare
| } | ||
|
|
||
| int xdebug_lib_start_with_request(int for_mode) | ||
| int xdebug_lib_start_with_request() |
There was a problem hiding this comment.
| int xdebug_lib_start_with_request() | |
| int xdebug_lib_start_with_request(void) |
let's keep it consistent with the rest of the codebase and the modern style
Does it also make sense to add these to config.m4?
-Wstrict-prototypes
-Wold-style-definition
-Wmissing-prototypes
There was a problem hiding this comment.
Updated. I worked with the compiler warnings in another branch
| #define XDEBUG_START_WITH_REQUEST_TRIGGER 4 | ||
| #define XDEBUG_START_WITH_REQUEST_YES 1 | ||
| #define XDEBUG_START_WITH_REQUEST_NO 2 | ||
| #define XDEBUG_START_WITH_REQUEST_TRIGGER 3 |
There was a problem hiding this comment.
Is it safe to change the values here?
There was a problem hiding this comment.
Yes, it is safe. These values are only used internally and not exposed to the user. In the xdebug_lib_set_start_with_request() function the actual value entered by the user, which will be a string will be transformed in one of these flags
c6b4bf9 to
940159d
Compare
# Conflicts: # tests/debugger/bug02122.phpt # tests/debugger/start_with_request_default_break.phpt # tests/debugger/start_with_request_default_config.phpt
940159d to
73e4488
Compare
|
Rebased and ready to be merged |
Uh oh!
There was an error while loading. Please reload this page.