PHP-GTK Problems (repost) |
Site Admin
|
DBG displays variables as is. If they are changed, it displays them changed
What IDE are you using for your work? |
||||||||||||
|
|
I'm using the trial version of PhpED. Maybe I don't have something configured properly? I've got a little sandbox program where a button toggles a variable between 0 and 1. When I click it the program functions as normal and changes the variable, but it doesn't display the change in the object window.
|
||||||||||||
|
Site Admin
|
Well, I'm still not sure where that object window that is expected to reflect changes. Could you please post a sample and screenshots? |
||||||||||||||
|
|
Sure, here's the sandbox I'm using. In the lower left corner (where all the objects are hiding) it doesn't display any changes in currPage. One thing I do notice though is that the variable _does_ update if you get out of the gtk::main() loop. Unfortunately, that only happens when the program crashes or you cancel the application.
|
||||||||||||||
Last edited by ABuczacki on Mon Jun 19, 2006 2:28 pm; edited 1 time in total |
Site Admin
|
well, what's about screenshot of that object window where you're expecting the variables to change?
|
||||||||||||
|
|
I added a line after I create the object where I set currPage to 42. In the debug windows (both local and global) it recognizes the change in variable when it goes to 42, but when it hits the main() loop, the variable stays the same regardless of what currPage really is. Only after the loop does it change. I'll try to get some screenshots up now, I'll edit them into this post.
right after the object is initialized: object initialized and currPage set to 42: button is clicked once in the window, currPage SHOULD be 1: button clicked again, currPage should be 0: (subsequent clicks just toggle between the above two steps) Assume currPage is 1, exit window (click the x in the upper right): While I only show the Locals tab, it's the same value in the Globals tab as well. |
||||||||||||
|
Site Admin
|
Ah, now I got it
Thanks for the screenshots. While IDE is in a debug sesession, it may operate in two different states. First one is when debugger waits for user action. It allows you to click all kinds of step (Step In, Step out...) Continue, Stop etc. In this state, let's call it command state, IDE waits for next command and shows you what previous command resulted with. If you, for example did step over $bob->currPage = 42, IDE will reflect changes done by this statement immediately when it enters command state. Another state is when IDE performs your command. In this state, it only lets you press Stop to terminate debug session and press Pause to break execution on a line. In this state php performs statement(s), changes values and so forth, but no data is transmitted to the ide (or it would slow down by million times). So... I think there is nothing wrong with IDE in your case. Just put a breakpoint on a line to see variable values on that line and continue execution until next point of interest. That's a common scenario for all interactive debuggers. Let me know if you have any doubts |
||||||||||||
|
PHP-GTK Problems (repost) |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by