[gnome-builder/gnome-builder-3-38] run: Stop showing full GLib debug messages when not debugging



commit 832125afdbd59673038bab808d2d68cc4457788a
Author: vanadiae <vanadiae35 gmail com>
Date:   Sat Dec 12 18:52:02 2020 +0100

    run: Stop showing full GLib debug messages when not debugging
    
    Currently when running an application, Builder enables all GLib debug
    messages, which means that it always spams the logs, which makes it hard
    to see actual printing inserted in work-in-progress code.
    
    So this commit stops enabling debug messages with the Run button, but
    still shows them when running with the debugger, so there's still an
    easy way to see those.
    
    Additionally, it's still possible to use the Runtime Environment section
    in the Build Preferences to enable those again.
    
    Fixes #1270

 src/libide/debugger/ide-debug-manager.c | 2 ++
 src/libide/foundry/ide-run-manager.c    | 2 --
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/libide/debugger/ide-debug-manager.c b/src/libide/debugger/ide-debug-manager.c
index 41c2b86a0..4b4a989d4 100644
--- a/src/libide/debugger/ide-debug-manager.c
+++ b/src/libide/debugger/ide-debug-manager.c
@@ -1001,6 +1001,8 @@ ide_debug_manager_start (IdeDebugManager  *self,
       IDE_GOTO (failure);
     }
 
+  IdeEnvironment *environment = ide_runner_get_environment (runner);
+  ide_environment_setenv (environment, "G_MESSAGES_DEBUG", "all");
   ide_debugger_prepare (debugger, runner);
 
   g_signal_connect_object (runner,
diff --git a/src/libide/foundry/ide-run-manager.c b/src/libide/foundry/ide-run-manager.c
index 620839153..6891952dd 100644
--- a/src/libide/foundry/ide-run-manager.c
+++ b/src/libide/foundry/ide-run-manager.c
@@ -516,8 +516,6 @@ do_run_async (IdeRunManager *self,
    * for the application.
    */
   environment = ide_runner_get_environment (runner);
-  /* FIXME: Allow toggling this in build prefs */
-  ide_environment_setenv (environment, "G_MESSAGES_DEBUG", "all");
   copy_builtin_envvars (environment);
   ide_environment_copy_into (ide_config_get_environment (config), environment, TRUE);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]