Debugger bug

Post bugs related to the IDE here
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Debugger bug

Post by Tenaja »

If you have a local var with the same name as a global, when you right-click the local and select Add to WatchList, it adds the global var, and not the local.

All of the other Locals give an error "Variable Not Found!"
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Debugger bug

Post by IdeasVacuum »

Now that's interesting - I can't right click to add a var to the Watch List, the option to do so is not listed (PB4.61 x86 on WinXP SP3 32bit).

If I add vars to the list (copy-paste), the Global and Local (Protected) vars are identified in the list correctly, but only the value of the Global vars is displayed :shock: However, if the Local var is Static, it's listed as Static instead of Local and the value is displayed in the watch list..........
........ the Variable Viewer on the other hand lists the vars automatically, but from the code below it only lists Globals igOne, iVar and local vars iEvent and iGdgID. A bit Confused. Though I just use debug output in any case as I don't like to have too many windows in the way.

Image

Code: Select all

Global igOne.i = 1
Global  iVar.i = 100


Procedure Vars()
;---------------
Static.i         iVar.i = 12
Protected iAnotherVar.i = 22
Protected    iAnother.i = 44

                 iVar + igOne
          iAnotherVar + iAnother

EndProcedure

Procedure Win()
;--------------

       If OpenWindow(0, 0, 0, 200, 40, "Watch Vars",#PB_Window_SystemMenu | #PB_Window_TitleBar | #PB_Window_ScreenCentered)

                 ButtonGadget(1,  0,  5,  200,  30, "Update Vars", #PB_Button_Default)
       EndIf

EndProcedure

Procedure WaitForUser()
;---------------------
Protected iEvent.i
Protected iGdgID.i

     Repeat
                   iEvent = WaitWindowEvent(1)
            Select iEvent

                         Case #PB_Event_Gadget

                                   iGdgID = EventGadget()
                            Select iGdgID
                                   Case 1: Vars()
                            EndSelect
            EndSelect

     Until iEvent = #PB_Event_CloseWindow

EndProcedure

Win()
WaitForUser()
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
Tenaja
Addict
Addict
Posts: 1959
Joined: Tue Nov 09, 2010 10:15 pm

Re: Debugger bug

Post by Tenaja »

IdeasVacuum wrote:Now that's interesting - I can't right click to add a var to the Watch List, the option to do so is not listed (PB4.61 x86 on WinXP SP3 32bit).
The right-click I am referring to is in the Variable Viewer.

I am using 4.61, Win7, 32-bit.
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Debugger bug

Post by IdeasVacuum »

The right-click I am referring to is in the Variable Viewer.
I didn't know that, I thought you meant directly in the code (IDE). However, right click in the Variable Viewer does not work here. Not only that, it has this morning decided to ignore all the local vars and only shows the two Globals........... :?
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Post Reply