diff --git a/pydevd.py b/pydevd.py
index <HASH>..<HASH> 100644
--- a/pydevd.py
+++ b/pydevd.py
@@ -589,11 +589,11 @@ class PyDB:
                                     # add import hooks for matplotlib patches if only debug console was started
                                     try:
                                         self.init_matplotlib_in_debug_console()
-                                        self.mpl_hooks_in_debug_console = True
                                         self.mpl_in_use = True
                                     except:
-                                        pydev_log.error("Matplotlib support in debug console failed\n")
-                                        traceback.print_exc()
+                                        PydevdLog(2, "Matplotlib support in debug console failed", traceback.format_exc())
+                                    finally:
+                                        self.mpl_hooks_in_debug_console = True
 
                                 if int_cmd.canBeExecutedBy(curr_thread_id):
                                     PydevdLog(2, "processing internal command ", str(int_cmd))
Do not report the error with matploltib support every time (PY-<I>)

Log error in debug console and don't show it to user

(cherry picked from commit <I>d0b<I>f2ecdb<I>e<I>bb<I>e<I>ddd9)