Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development
New project Wizard: Squirrel error
jimbo:
My new project wizard produces a
sq_get*() failed (type error)
when it tries to complete. I am having great difficulty tracking the cause down. I aded some instrumentation to the throw that produces that error, but that just gave me sq_get*() at line 1912 in ../../../src/include/scripting/sqplus/sqplus.h which doesn't help.
Oddly, the work that the wizard does is then not updated in the project until I run the wizard again. Its as if its in an odd state tht is recovered by the next run of the wizard. Each subsequent run updates the previous project to the correct state.
So what is the best way to debug this sort of thing? Or indeed any sort of issues when running scripts?
TIA, Jimbo.
BlueHazzard:
Can you share the code? A image of the error message?
Some time ago i implemented an debugger for squirrel, but it does not apply to the current branch of codeblocks without problems...
https://github.com/bluehazzard/codeblocks_sf/commit/9ea66a9f3801511cda72ae1cf107c9e1d5c4e91c
and the plugin for debugging:
https://github.com/bluehazzard/cbSquirrelDebugger
But sadly you can not use this with the current code in trunk...
--- Quote --- I am having great difficulty tracking the cause down
--- End quote ---
The easiest thing is to put a log output after every line of the code and observe where it fails... Or at least find the function where it fails
Error handling is terrible on the scripting side...
oBFusCATed:
I think the view -> script console shows backtraces, but I might be wrong...
Generally printf style debugging is one of the best options. The next option if printf debugging doesn't work is debugging the whole codeblocks with a c++ debugger like gdb.
BlueHazzard:
I updated the code in this branch: https://github.com/bluehazzard/codeblocks_sf/tree/test/squirrel/debuggerserver/1
This is up to date branch with the squirrel debug server. There is still a problem, that i do not get any frame info and watches. I do not know where the error is at the moment...
Only the project files for windows are updated at the moment. Probably because the debugger is written for squirrel 3.0 and we use 2.2 in codeblocks...
The same for the plugin. I updated the windows files.
jimbo:
What is the printf equivilent in the script so I can add logging to the script itself.
Although, I suspect that the error somewhere in CB itself, as has commented out almost everything in the script, yet I still get the error!
I'm using a fairly recent development tree from svn (last week IIRC), running on recent Lubuntu.
Error message (with my mod to display line number and source file) attached.
Navigation
[0] Message Index
[#] Next page
Go to full version