From ddf912eb2c3a7aac0b28b89ef6afced6a5202b8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Sun, 1 Mar 2015 20:29:56 +0000 Subject: [PATCH] [DEVELOPMENT ENVIRONMENT] * NEW: Remove the "Break on error" debugging option. It is useless, and leads to unexpected errors when it is forgotten. git-svn-id: svn://localhost/gambas/trunk@6925 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- app/src/gambas3/.src/Debug/Design.module | 50 +++++++++---------- app/src/gambas3/.src/FMain.class | 10 ++-- app/src/gambas3/.src/FMain.form | 25 ++-------- app/src/gambas3/.src/Project.module | 12 ++--- .../gambas3/.src/Project/CProjectList.class | 1 - 5 files changed, 39 insertions(+), 59 deletions(-) diff --git a/app/src/gambas3/.src/Debug/Design.module b/app/src/gambas3/.src/Debug/Design.module index 6714c0b84..517352bb9 100644 --- a/app/src/gambas3/.src/Debug/Design.module +++ b/app/src/gambas3/.src/Debug/Design.module @@ -41,7 +41,7 @@ Public BalloonX As Integer Public BalloonY As Integer Private $sProfilePath As String -Private $bUpdateBreakOnError As Boolean +'Private $bUpdateBreakOnError As Boolean Private $sPipeError As String Private $hPipeError As File @@ -120,18 +120,18 @@ Public Sub Pause() End -Public Sub UpdateBreakOnError() - - If $iState = STATE_STOP Then Return - - If $iState = STATE_RUNNING Then - $bUpdateBreakOnError = True - $hProcess.Signal - Else - BreakOnError - Endif - -End +' Public Sub UpdateBreakOnError() +' +' If $iState = STATE_STOP Then Return +' +' If $iState = STATE_RUNNING Then +' $bUpdateBreakOnError = True +' $hProcess.Signal +' Else +' BreakOnError +' Endif +' +' End Public Sub Process_Error(sData As String) @@ -806,7 +806,7 @@ Private Sub Start(sCmd As String) $sAddBreakpoint = "" Endif - If Project.BreakOnError Then $sCmdStart &= "b+\n" + 'If Project.BreakOnError Then $sCmdStart &= "b+\n" $sCmdStart &= sCmd '$sCmdStartRun = sCmd @@ -1026,11 +1026,11 @@ Public Sub Command(sCmd As String, Optional iNewState As Integer = STATE_LAST) End -Private Sub BreakOnError() - - WriteCommand("b" & If(Project.BreakOnError, "+", "-")) - -End +' Private Sub BreakOnError() +' +' WriteCommand("b" & If(Project.BreakOnError, "+", "-")) +' +' End Private Sub Signal() @@ -1047,12 +1047,12 @@ Private Sub Signal() Return Endif - If $bUpdateBreakOnError Then - $bUpdateBreakOnError = False - BreakOnError - Command("", STATE_RUNNING) - Return - Endif + ' If $bUpdateBreakOnError Then + ' $bUpdateBreakOnError = False + ' BreakOnError + ' Command("", STATE_RUNNING) + ' Return + ' Endif 'IF $iState = STATE_DEBUG THEN RETURN diff --git a/app/src/gambas3/.src/FMain.class b/app/src/gambas3/.src/FMain.class index f2c63828d..845402ae9 100644 --- a/app/src/gambas3/.src/FMain.class +++ b/app/src/gambas3/.src/FMain.class @@ -1249,7 +1249,7 @@ Public Sub OnProjectChange() mnuRedirectStderr.Value = Project.RedirectStderr mnuUseHttpServer.Value = Project.UseHttpServer mnuProfile.Value = Project.Profiling - Action["breakerr"].Value = Project.BreakOnError + 'Action["breakerr"].Value = Project.BreakOnError OnRefreshComponents 'UpdateTranslate 'RefreshInfo @@ -1446,10 +1446,10 @@ Public Sub Action_Activate((Key) As String) As Boolean Project.Profiling = Action["profile"].Value Project.WriteProject(True) - Case "breakerr" - Project.BreakOnError = Action["breakerr"].Value - Project.WriteProject(True) - Design.UpdateBreakOnError + ' Case "breakerr" + ' Project.BreakOnError = Action["breakerr"].Value + ' Project.WriteProject(True) + ' Design.UpdateBreakOnError Case "open-profile" OpenProfile diff --git a/app/src/gambas3/.src/FMain.form b/app/src/gambas3/.src/FMain.form index 0f72c2231..4b0ecc032 100644 --- a/app/src/gambas3/.src/FMain.form +++ b/app/src/gambas3/.src/FMain.form @@ -287,12 +287,6 @@ Text = Shortcut(("Finish"), "h") Picture = Picture["icon:/small/eject"] } - { mnuBreakOnError Menu - Action = "breakerr" - Text = ("Break on each error") - Picture = Picture["icon:/small/error"] - Toggle = True - } { Menu9 Menu } { mnuOpenProfile Menu @@ -934,14 +928,6 @@ Action = "until" Picture = Picture["icon:/small/jump"] } - { btnBreakOnError ToolButton mnuBreakOnError - Name = "btnBreakOnError" - MoveScaled(90,0,4,4) - ToolTip = ("Break on each error") - Action = "breakerr" - Picture = Picture["icon:/small/error"] - Toggle = True - } { btnShowMenu ToolButton MoveScaled(94,0,4,4) Visible = False @@ -1085,8 +1071,8 @@ } { msgError MessageView MoveScaled(27,10,57,6) - Separator = True Animated = True + Separator = True } { Panel1 Panel MoveScaled(1,18,105,77) @@ -1251,11 +1237,6 @@ Shortcut = "Ctrl+Alt+A" Picture = "icon:/small/archive" } - { Action breakerr - Text = "Break on each error" - Shortcut = "" - Picture = "icon:/small/error" - } { Action browse-project Text = "Browse project" Shortcut = "Ctrl+Alt+O" @@ -1598,7 +1579,7 @@ { Toolbars { Toolbar main Text = "" - List = "new-project,open-project,save-project,save-project-as,project-property,project-version,refresh-project,option,shortcut,exec,translate,archive,install,project,property,control,console,find,help,compile,compile-all,start,pause,stop,step,forward,return,until,breakerr,find-project,go-back,go-forward,browse-project,open-terminal,send-mail,menu-file,menu-project,menu-debug,menu-view,menu-tool,menu-help,publish,farm,gui" - Default = "new-project,open-project,save-project,save-project-as,project-property,project-version,option,|,exec,translate,|,compile,compile-all,start,pause,stop,step,forward,return,until,breakerr,-,find-project,go-back,go-forward" + List = "new-project,open-project,save-project,save-project-as,project-property,project-version,refresh-project,option,shortcut,exec,translate,archive,install,project,property,control,console,find,help,compile,compile-all,start,pause,stop,step,forward,return,until,find-project,go-back,go-forward,browse-project,open-terminal,send-mail,menu-file,menu-project,menu-debug,menu-view,menu-tool,menu-help,publish,farm,gui" + Default = "new-project,open-project,save-project,save-project-as,project-property,project-version,option,|,exec,translate,|,compile,compile-all,start,pause,stop,step,forward,return,until,-,find-project,go-back,go-forward" } } diff --git a/app/src/gambas3/.src/Project.module b/app/src/gambas3/.src/Project.module index b8fe6833c..ee03726af 100644 --- a/app/src/gambas3/.src/Project.module +++ b/app/src/gambas3/.src/Project.module @@ -101,7 +101,7 @@ Public RedirectStderr As Boolean Public UseHttpServer As Boolean Public Profiling As Boolean Public ProfileIndex As Integer -Public BreakOnError As Boolean +'Public BreakOnError As Boolean Public Running As Boolean 'Public JustUpdateVersion As Boolean @@ -3203,7 +3203,7 @@ Public Sub ReadProject(Optional bConvert As Boolean) UseHttpServer = False Profiling = False ProfileIndex = 0 - BreakOnError = False + 'BreakOnError = False Maintainer = "" Vendor = "" Address = "" @@ -3449,9 +3449,9 @@ Public Sub ReadProject(Optional bConvert As Boolean) Case "profiling" Profiling = CInt(sVal) <> 0 - Case "breakonerror" - BreakOnError = CInt(sVal) <> 0 - + ' Case "breakonerror" + ' BreakOnError = CInt(sVal) <> 0 + ' Case "createeachdirectory" CreateEachDirectory = CInt(sVal) <> 0 @@ -3580,7 +3580,7 @@ Public Sub WriteProject(Optional bComponentDoNotChange As Boolean, Optional bMak If RedirectStderr Then Print #hFic, "RedirectStderr=1" If UseHttpServer Then Print #hFic, "UseHttpServer=1" If Profiling Then Print #hFic, "Profiling=1" - If BreakOnError Then Print #hFic, "BreakOnError=1" + 'If BreakOnError Then Print #hFic, "BreakOnError=1" If Icon Then Print #hFic, "Icon="; Icon GetVersion() diff --git a/app/src/gambas3/.src/Project/CProjectList.class b/app/src/gambas3/.src/Project/CProjectList.class index 16c5ff86b..3e1c3663c 100644 --- a/app/src/gambas3/.src/Project/CProjectList.class +++ b/app/src/gambas3/.src/Project/CProjectList.class @@ -96,7 +96,6 @@ Private Sub FillWithExample() Dim hProjectItem As ProjectBox Dim sGroup As String Dim aExamples As String[] - Dim hHelp As WebView Inc Application.Busy $hList.Arrangement = Arrange.None