summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibJS/Console.cpp10
-rw-r--r--Userland/Libraries/LibJS/Console.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Console.cpp b/Userland/Libraries/LibJS/Console.cpp
index 5d549d0c47..c4fe3590be 100644
--- a/Userland/Libraries/LibJS/Console.cpp
+++ b/Userland/Libraries/LibJS/Console.cpp
@@ -35,8 +35,14 @@ Console::Console(GlobalObject& global_object)
{
}
+VM& Console::vm()
+{
+ return m_global_object.vm();
+}
+
Value Console::debug()
{
+ dbgln("\033[32;1m(js debug)\033[0m {}", vm().join_arguments());
if (m_client)
return m_client->debug();
return js_undefined();
@@ -44,6 +50,7 @@ Value Console::debug()
Value Console::error()
{
+ dbgln("\033[32;1m(js error)\033[0m {}", vm().join_arguments());
if (m_client)
return m_client->error();
return js_undefined();
@@ -51,6 +58,7 @@ Value Console::error()
Value Console::info()
{
+ dbgln("\033[32;1m(js info)\033[0m {}", vm().join_arguments());
if (m_client)
return m_client->info();
return js_undefined();
@@ -58,6 +66,7 @@ Value Console::info()
Value Console::log()
{
+ dbgln("\033[32;1m(js log)\033[0m {}", vm().join_arguments());
if (m_client)
return m_client->log();
return js_undefined();
@@ -65,6 +74,7 @@ Value Console::log()
Value Console::warn()
{
+ dbgln("\033[32;1m(js warn)\033[0m {}", vm().join_arguments());
if (m_client)
return m_client->warn();
return js_undefined();
diff --git a/Userland/Libraries/LibJS/Console.h b/Userland/Libraries/LibJS/Console.h
index d8d96be85c..0782ddf14d 100644
--- a/Userland/Libraries/LibJS/Console.h
+++ b/Userland/Libraries/LibJS/Console.h
@@ -47,6 +47,8 @@ public:
GlobalObject& global_object() { return m_global_object; }
const GlobalObject& global_object() const { return m_global_object; }
+ VM& vm();
+
HashMap<String, unsigned>& counters() { return m_counters; }
const HashMap<String, unsigned>& counters() const { return m_counters; }