diff --git a/src/Gui/RemoteDebugger.py b/src/Gui/RemoteDebugger.py index 040828f59166..7e3eba88c334 100644 --- a/src/Gui/RemoteDebugger.py +++ b/src/Gui/RemoteDebugger.py @@ -34,9 +34,18 @@ def __init__(self, parent=None): self.dialog.buttonBox.accepted.connect(self.accept) self.dialog.buttonBox.rejected.connect(self.reject) + self.prefs = App.ParamGet("User parameter:BaseApp/Macro/Debugger") + index = self.prefs.GetInt("TabIndex", 0) + self.dialog.tabWidget.setCurrentIndex(index) + address = self.prefs.GetString("VSCodeAddress", "localhost") + port = self.prefs.GetInt("VSCodePort", 5678) + self.dialog.lineEditAddress.setText(address) + self.dialog.spinBoxPort.setValue(port) + def accept(self): try: index = self.dialog.tabWidget.currentIndex() + self.prefs.SetInt("TabIndex", index) if index == 0: # winpdb passwd = self.dialog.lineEditPassword.text() @@ -47,6 +56,8 @@ def accept(self): elif index == 1: # VS code address = self.dialog.lineEditAddress.text() port = self.dialog.spinBoxPort.value() + self.prefs.SetString("VSCodeAddress", address) + self.prefs.SetInt("VSCodePort", port) import debugpy