Skip to content

Commit 20318c4

Browse files
committed
Added breaking upon fatal-ish error
1 parent ef3e011 commit 20318c4

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

phpdbg.c

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,35 @@ static void php_sapi_phpdbg_log_message(char *message TSRMLS_DC) /* {{{ */
438438
*/
439439
if (phpdbg_booted) {
440440
phpdbg_error("%s", message);
441+
442+
switch (PG(last_error_type)) {
443+
case E_ERROR:
444+
case E_CORE_ERROR:
445+
case E_COMPILE_ERROR:
446+
case E_USER_ERROR:
447+
case E_PARSE:
448+
case E_RECOVERABLE_ERROR:
449+
if (!(PHPDBG_G(flags) & PHPDBG_IN_EVAL)) {
450+
phpdbg_list_file(
451+
zend_get_executed_filename(TSRMLS_C),
452+
3,
453+
zend_get_executed_lineno(TSRMLS_C)-1,
454+
zend_get_executed_lineno(TSRMLS_C)
455+
TSRMLS_CC
456+
);
457+
}
458+
459+
do {
460+
switch (phpdbg_interactive(TSRMLS_C)) {
461+
case PHPDBG_LEAVE:
462+
case PHPDBG_FINISH:
463+
case PHPDBG_UNTIL:
464+
case PHPDBG_NEXT:
465+
return;
466+
}
467+
} while (!(PHPDBG_G(flags) & PHPDBG_IS_QUITTING));
468+
469+
}
441470
} else fprintf(stdout, "%s\n", message);
442471
}
443472
/* }}} */

0 commit comments

Comments
 (0)