Netbeans Xdebug: mysqli_affected_rows retorna "-1" quando deveria ser "1"

Estou confuso por que o código a seguir adiciona com êxito uma nova linha à minha tabela do banco de dados enquantomysqli_affected_rows($dbc) retorna "-1", portanto, um erro, em signup.php:

dbc.inc.php:

DEFINE ('DB_USER', 'root');
DEFINE ('DB_PASSWORD', '');
DEFINE ('DB_HOST', 'localhost');
DEFINE ('DB_NAME', 'v');


$dbc = mysqli_connect (DB_HOST, DB_USER, DB_PASSWORD, DB_NAME) or die('Error connecting to MySQL server.');

mysqli_set_charset($dbc, 'utf8');

signup.php:

require('dbc.inc.php');

//code to set variables for the following SQL statement

$q = "INSERT INTO users (username, email, pass, first_name, last_name, sex, birth_day, birth_month, birth_year, phone, street, street_nr, city, zip_code, country, user_img) VALUES ('$u', '$e', '$p', '$fn', '$ln', '$sex', '$bd', '$bm', '$by', '$pn', '$st', '$sn', '$cit', '$pc', '$ct', '$user_img')";
$r = mysqli_query($dbc, $q) or die(msg(0, "Error connecting to the database"));

if (mysqli_affected_rows($dbc) === 1) { //Returns 'false' despite one row having been added...
echo "Success";
}
else {
echo "Error"; //...resulting in "Error" being echoed
}

Para fins de teste: SQL para criar a tabela "users":

CREATE TABLE IF NOT EXISTS `v`.`users` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `type` ENUM('member','admin') NOT NULL DEFAULT 'member',
  `username` VARCHAR(45) NOT NULL,
  `email` VARCHAR(80) NOT NULL,
  `pass` VARCHAR(255) NOT NULL,
  `first_name` VARCHAR(45) NOT NULL,
  `last_name` VARCHAR(45) NOT NULL,
  `sex` CHAR(1) NOT NULL,
  `birth_day` INT NOT NULL,
  `birth_month` INT NULL,
  `birth_year` INT NULL,
  `phone` VARCHAR(20) NULL,
  `street` VARCHAR(60) NOT NULL,
  `street_nr` VARCHAR(9) NOT NULL,
  `city` VARCHAR(45) NOT NULL,
  `zip_code` VARCHAR(45) NOT NULL,
  `country` VARCHAR(45) NOT NULL,
  `user_img` VARCHAR(65) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE INDEX `username_UNIQUE` (`username` ASC),
  UNIQUE INDEX `email_UNIQUE` (`email` ASC),
  INDEX `login` (`email` ASC, `pass` ASC))
ENGINE = InnoDB
AUTO_INCREMENT = 4
DEFAULT CHARACTER SET = utf8;

Ficaria muito grato por suas dicas!

EDITAR: Enquanto isso, consegui isolar o problema um pouco mais: o código funciona bem, diretamente no navegador da web, é apenas no Netbeans / Xdebug quemysqli_affected_rows($dbc) na linha correspondente primeiro retorna corretamente "1", mas depois de entrar na linha seguinte (F7) muda repentinamente para "-1" e, assim, salta incorretamente para a ramificação "else" retornando um erro, embora os dados sejam corretamente gravados no arquivo base de dados.Aparentemente, eu não sou o único com esse problema.

Estas são minhas configurações do Xdebug no php.ini, mas acho que estão corretas.

zend_extension = "C:\xampp\php\ext\php_xdebug.dll"
;xdebug.profiler_append = 0
xdebug.profiler_enable = 1
;xdebug.profiler_enable_trigger = 0
;xdebug.profiler_output_dir = "C:\xampp\tmp"
;xdebug.profiler_output_name = "cachegrind.out.%t-%s"
xdebug.remote_enable = 1
xdebug.remote_handler = "dbgp"
xdebug.remote_host = "localhost"
xdebug.remote_port = 9000
;xdebug.trace_output_dir = "C:\xampp\tmp"

Alguma pista alguém?

questionAnswers(1)

yourAnswerToTheQuestion