From 2377aec000c4cce99f69466dc41fb3dc935b726a Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Wed, 20 Jun 2018 17:13:04 +0200 Subject: [PATCH] src: fix debugging for multiple categories Fix parsing of e.g. `NODE_DEBUG_NATIVE=worker,messaging`. PR-URL: https://github.com/nodejs/node/pull/21422 Reviewed-By: Colin Ihrig Reviewed-By: Ruben Bridgewater --- src/env.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/env.cc b/src/env.cc index 6f6e9f3920f4b1..2236893dd77923 100644 --- a/src/env.cc +++ b/src/env.cc @@ -537,7 +537,7 @@ void Environment::set_debug_categories(const std::string& cats, bool enabled) { if (comma_pos == std::string::npos) break; // Use everything after the `,` as the list for the next iteration. - debug_categories = debug_categories.substr(comma_pos); + debug_categories = debug_categories.substr(comma_pos + 1); } }