summaryrefslogtreecommitdiff
path: root/src/node_internals.h
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2017-11-20 23:37:50 +0100
committerBen Noordhuis <info@bnoordhuis.nl>2017-11-20 23:37:50 +0100
commitf526deb0407412e089382900e3fc4560eea3a938 (patch)
tree3900be9dae9cfc4f4920edaaa0ea9f54471c3cf4 /src/node_internals.h
parent7dc35e937d6b3cf57e6184dfc3d54633e5b69082 (diff)
downloadandroid-node-v8-f526deb0407412e089382900e3fc4560eea3a938.tar.gz
android-node-v8-f526deb0407412e089382900e3fc4560eea3a938.tar.bz2
android-node-v8-f526deb0407412e089382900e3fc4560eea3a938.zip
src: inspector context name = program title + pid
Report (for example) "node[1337]" as the human-readable name rather than the more generic and less helpful "Node.js Main Context." While not perfect yet, it should be an improvement to people that debug multiple processes from DevTools, VS Code, etc. PR-URL: https://github.com/nodejs/node/pull/17087 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Eugene Ostroukhov <eostroukhov@google.com> Reviewed-By: Timothy Gu <timothygu99@gmail.com>
Diffstat (limited to 'src/node_internals.h')
-rw-r--r--src/node_internals.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/node_internals.h b/src/node_internals.h
index 7c4a0d9fa2..b7d032c68d 100644
--- a/src/node_internals.h
+++ b/src/node_internals.h
@@ -251,6 +251,9 @@ void RegisterSignalHandler(int signal,
uint32_t GetProcessId();
bool SafeGetenv(const char* key, std::string* text);
+std::string GetHumanReadableProcessName();
+void GetHumanReadableProcessName(char (*name)[1024]);
+
template <typename T, size_t N>
constexpr size_t arraysize(const T(&)[N]) { return N; }