Breakpoints are not working! Is there anything special I should be aware of?
thanks [import]uid: 28795 topic_id: 34851 reply_id: 334851[/import]
Breakpoints are not working! Is there anything special I should be aware of?
thanks [import]uid: 28795 topic_id: 34851 reply_id: 334851[/import]
Breakpoints work fine on mine. I’m on Win 7, Glider 1.7.2
You are using the “debug” button when you run it, yes? Did this just start happening?
[import]uid: 10818 topic_id: 34851 reply_id: 138507[/import]
Yes I am using the debug button :). It was working before, but stop suddenly for no apparent reason.
[import]uid: 28795 topic_id: 34851 reply_id: 138509[/import]
Sorry but I gotta ask the obvious questions. You didn’t mention your OS. If on Windows, you can try this to see if it fixes it:
Close Glider
Navigate to this folder: “C:\Users\YOURNAMEDIR\AppData\Roaming.luaglider”
rename the “dev” folder you find here to something like “bad-dev”
Restart Glider
This will reset it. You might loose preferences, so save those out first. I have used this trick when Glider hangs on me and the windows don’t appear on screen. Works like a charm. Glider will rebuild the dev folder and it’s needed contents.
I love the benefits of the Glider IDE, but it is a bit buggy. I’m hoping instead of features they are aiming to get things stabilized in the next release.
[import]uid: 10818 topic_id: 34851 reply_id: 138512[/import]
I am on Windows. Thanks for your suggestion, but unfortunately it did not work. I will try to uninstall it and re-install it once again. [import]uid: 28795 topic_id: 34851 reply_id: 138514[/import]
Please ensure that the CiderDebugger.lua is being properly copied to your dev folder. Also be sure that the require “CiderDebugger” line in your main.lua is also properly inserted upon pressing the debug button. Also, are you using daily builds of Corona? Also, please check to make sure there are no Corona simulators running your project other than the one launched by Glider. The Corona sim locks the main.lua file initially so this may be causing the problem.
Thanks for all your suggestions it is greatly appreciated!
" I’m hoping instead of features they are aiming to get things stabilized in the next release."
Indeed the next release will fix a lot of bugs. One of the most common bugs users experience is file locking issues. The new build system will address that by copying files over to a new folder and not touching the dev files themselves. This also fixes the CiderDebugger lingering around the project directory for instance. So far the beta has been very stable and this should translate to the release as well.
Also a hint: If you go to help->User directory, it will automatically open the “C:\Users\YOURNAMEDIR\AppData\Roaming.luaglider” folder for you.
Regards,
M.Y. Developers [import]uid: 55057 topic_id: 34851 reply_id: 138515[/import]
Sorry guys-- I spoke too soon! Looks like it is NOT working for me, either!
I get an error. “CiderDebugger.lua:735: table index key is nil”
The breakpoint stops the code from executing, but no variable values show up. I assumed everything was good cuz it was fine the last time I used it. My bad!
Sounds like maybe something changed in a daily build that broke it maybe?
@M.Y.Developers: I’m excited to hear that and can’t wait for the next release! I think you’ve got a great IDE. It’s the only thing I use for Corona, now. Keep up the good work! [import]uid: 10818 topic_id: 34851 reply_id: 138520[/import]
Hey–
I think I know what is going on. On one of my projects, I started using “middleclass.lua” for a standardized class-creation system. It appears that this fouls up the debugging system in Lua Glider. This is a nice, clean library, so it would suck if Glider and middleclass didn’t play nice with each other.
@nmichaud - are you using the middleclass.lua library by chance?
[import]uid: 10818 topic_id: 34851 reply_id: 138528[/import]
Breakpoints are working for me in Glider 1.7.2, I’m on the stable release 971 of Corona , tried on both Win 7 machine and Mac (I think 10.6 but might be higher).
Also the variables don’t appear automatically when a breakpoint is hit, but they’re there if you click on Variables in the bottom left.
-Treb [import]uid: 181948 topic_id: 34851 reply_id: 138540[/import]
@Treb-
Thanks. I just rolled back to 972. Breakpoints work as expected, but they fail if you use the middleclass.lua library for your class structure definitions. I’m not sure if middleclass is doing something a little hinky, or if Lua Glider just doesn’t know how to handle it’s clever methodology for class creation.
-duneunit [import]uid: 10818 topic_id: 34851 reply_id: 138541[/import]
Okay! I figured this out! So I was using middleclass.lua for my class structures, and I “enhanced” it with my own special __tostring and __concat functionality. It worked fine when Glider’s debugger was not activated, but as soon as the debugger kicked in, I think it sent it into a loop. Particularly in regards to how the metatable was set for the class prototype.
THIS CAUSED THE DEBUGGER TO BREAK… Here’s how I was doing it:
The instance’s metatable and the prototype metatable are the same. This works fine and I think should be fine from a coding standpoint. (Not 100% certain about this cuz I’m just digging into the metatable stuff in more depth now.) But it breaks the debugger.
SO THIS IS WHAT WORKS INSTEAD:
I don’t know if there is something wrong with my original method or not. It ran fine. If it’s okay, I’m wondering if Glider can adjust their debugger to allow for such things. If not, well… I would love some insight into my misguided ways.
[import]uid: 10818 topic_id: 34851 reply_id: 138546[/import]
Thanks for investigating this for us! We are looking into the issue and will get an update for you soon.
Regards,
M.Y. Developers
[import]uid: 55057 topic_id: 34851 reply_id: 138635[/import]
Although we weren’t able to replicate the bug using the recipe given, the problem probably lies in the __tostring. For future reference there is no such thing as rawget(tab, “__tostring”) so once the __tostring metamethod is set, there is no way to get the unique id (address) back. The workaround we came up with is in the patched CiderDebugger.lua but if anyone needs it:
local rawtostring = function(tab)
local mtTostring = tab.\_\_tostring
tab.\_\_tostring = nil
local result = tostring(tab)
tab.\_\_tostring = mtTostring
return result
end
We have patched the CiderDebugger.lua, you can download it here
www.mydevelopersgames.com/site/Cider/v1/v160Beta/test/CiderDebugger.lua
To apply the new patch for windows you just have to navigate to your install directory->luaglider
On our machine the path is:
C:\Program Files (x86)\Lua Glider\luaglider\CiderDebugger.lua
And just replace the old one with the one in the link.
For mac you have to right click->show package contents->resources->luaglider and replace CiderDebugger.lua
In the future, this type of update would occur using the autoupdate but we can’t use that just yet.
Please let us know if this works. If it does not then please provide a code snippet for each of the two scenarios.
Regards,
M.Y. Developers
[import]uid: 55057 topic_id: 34851 reply_id: 138641[/import]
@MYDevelopers-
Thanks- I really appreciate that you looked into this. So far, the patch doesn’t appear to change anything… BUT, I will try to investigate more in a day or two. The good news is that if I implement my __tostring differently, that seems to eliminate any problems and Glider and all else is working as desired. Because of this, I am starting to think the problem might be predominantly on my end… What really threw me off was having someone else report the identical issue at the same time I encountered it. I’ll update you when I figure it out, tho.
Thanks again!
[import]uid: 10818 topic_id: 34851 reply_id: 138713[/import]
Breakpoints work fine on mine. I’m on Win 7, Glider 1.7.2
You are using the “debug” button when you run it, yes? Did this just start happening?
[import]uid: 10818 topic_id: 34851 reply_id: 138507[/import]
Yes I am using the debug button :). It was working before, but stop suddenly for no apparent reason.
[import]uid: 28795 topic_id: 34851 reply_id: 138509[/import]
Sorry but I gotta ask the obvious questions. You didn’t mention your OS. If on Windows, you can try this to see if it fixes it:
Close Glider
Navigate to this folder: “C:\Users\YOURNAMEDIR\AppData\Roaming.luaglider”
rename the “dev” folder you find here to something like “bad-dev”
Restart Glider
This will reset it. You might loose preferences, so save those out first. I have used this trick when Glider hangs on me and the windows don’t appear on screen. Works like a charm. Glider will rebuild the dev folder and it’s needed contents.
I love the benefits of the Glider IDE, but it is a bit buggy. I’m hoping instead of features they are aiming to get things stabilized in the next release.
[import]uid: 10818 topic_id: 34851 reply_id: 138512[/import]
I am on Windows. Thanks for your suggestion, but unfortunately it did not work. I will try to uninstall it and re-install it once again. [import]uid: 28795 topic_id: 34851 reply_id: 138514[/import]
Please ensure that the CiderDebugger.lua is being properly copied to your dev folder. Also be sure that the require “CiderDebugger” line in your main.lua is also properly inserted upon pressing the debug button. Also, are you using daily builds of Corona? Also, please check to make sure there are no Corona simulators running your project other than the one launched by Glider. The Corona sim locks the main.lua file initially so this may be causing the problem.
Thanks for all your suggestions it is greatly appreciated!
" I’m hoping instead of features they are aiming to get things stabilized in the next release."
Indeed the next release will fix a lot of bugs. One of the most common bugs users experience is file locking issues. The new build system will address that by copying files over to a new folder and not touching the dev files themselves. This also fixes the CiderDebugger lingering around the project directory for instance. So far the beta has been very stable and this should translate to the release as well.
Also a hint: If you go to help->User directory, it will automatically open the “C:\Users\YOURNAMEDIR\AppData\Roaming.luaglider” folder for you.
Regards,
M.Y. Developers [import]uid: 55057 topic_id: 34851 reply_id: 138515[/import]
Sorry guys-- I spoke too soon! Looks like it is NOT working for me, either!
I get an error. “CiderDebugger.lua:735: table index key is nil”
The breakpoint stops the code from executing, but no variable values show up. I assumed everything was good cuz it was fine the last time I used it. My bad!
Sounds like maybe something changed in a daily build that broke it maybe?
@M.Y.Developers: I’m excited to hear that and can’t wait for the next release! I think you’ve got a great IDE. It’s the only thing I use for Corona, now. Keep up the good work! [import]uid: 10818 topic_id: 34851 reply_id: 138520[/import]