src/eric7/Debugger/DebugServer.py

branch
eric7-maintenance
changeset 10349
df7edc29cbfb
parent 10148
31ba20629af4
parent 10335
cc0a21ae0975
child 10460
3b34efa2857c
--- a/src/eric7/Debugger/DebugServer.py	Tue Oct 31 09:23:05 2023 +0100
+++ b/src/eric7/Debugger/DebugServer.py	Wed Nov 29 14:23:36 2023 +0100
@@ -918,9 +918,9 @@
             # the peer is not allowed to connect
             res = EricMessageBox.yesNo(
                 None,
-                self.tr("Connection from illegal host"),
+                self.tr("Connection from unknown host"),
                 self.tr(
-                    """<p>A connection was attempted by the illegal host"""
+                    """<p>A connection was attempted by the unknown host"""
                     """ <b>{0}</b>. Accept this connection?</p>"""
                 ).format(peerAddress),
                 icon=EricMessageBox.Warning,
@@ -1002,6 +1002,7 @@
         enableMultiprocess=False,
         multiprocessNoDebug="",
         configOverride=None,
+        reportAllExceptions=False,
     ):
         """
         Public method to load a new program to debug.
@@ -1044,6 +1045,9 @@
         @param configOverride dictionary containing the global config override
             data
         @type dict
+        @param reportAllExceptions flag indicating to report all exceptions
+            instead of unhandled exceptions only
+        @type bool
         """
         self.__autoClearShell = autoClearShell
         self.__multiprocessNoDebugList = [
@@ -1090,6 +1094,7 @@
             tracePython,
             autoContinue,
             enableMultiprocess=enableMultiprocess,
+            reportAllExceptions=reportAllExceptions,
         )
         self.debugging = True
         self.running = True
@@ -2049,13 +2054,13 @@
             debuggerId,
         )
 
-    def passiveStartUp(self, fn, exc, debuggerId):
+    def passiveStartUp(self, fn, reportAllExceptions, debuggerId):
         """
         Public method to handle a passive debug connection.
 
         @param fn filename of the debugged script
         @type str
-        @param exc flag to enable exception reporting of the IDE
+        @param reportAllExceptions flag to enable reporting of all exceptions
         @type bool
         @param debuggerId ID of the debugger backend
         @type str
@@ -2066,7 +2071,7 @@
         self.running = True
         self.__restoreBreakpoints(debuggerId)
         self.__restoreWatchpoints(debuggerId)
-        self.passiveDebugStarted.emit(fn, exc)
+        self.passiveDebugStarted.emit(fn, reportAllExceptions)
 
     def __passiveShutDown(self):
         """
@@ -2203,7 +2208,8 @@
         @rtype str
         """
         try:
-            if ericApp().getObject("Project").isOpen():
+            project = ericApp().getObject("Project")
+            if project.isOpen() and project.getProjectVenv(resolveDebugger=False):
                 return self.tr("<project>")
             else:
                 return ""

eric ide

mercurial