Debugger call-stack
Hi,
can anyone point me in the direction of an example showing how to build a list of current variables in the call-stack?
I need to display (possibly edit) the variables available during the line-callback function as a debugger would.
I assume I use GetCallstackFunction, but where to go from there?
Thanks,
Ciaran.
I have an example of a simple AngelScript debugger here. I haven't updated it to the most recent version yet and it uses .NET bindings, but it should give you an idea of how you can use AngelScript's debugging API.
/test/test_future/test_debug.cpp
it has a simple example. :) hope it will help u.
it has a simple example. :) hope it will help u.
Quote:Original post by Carrot
Hi,
can anyone point me in the direction of an example showing how to build a list of current variables in the call-stack?
I need to display (possibly edit) the variables available during the line-callback function as a debugger would.
I assume I use GetCallstackFunction, but where to go from there?
Thanks,
Ciaran.
Though not really recommended as teaching material, you can take a look at the test code that I use: test_debug.
Specifically the function PrintVariables should answer your question.
Regards,
Andreas
PS. I'll try to write the page about debugging in the manual soon. :)
[edit]PPS. dxj beat me to the answer :)[/edit]
Specifically the function PrintVariables should answer your question.
Regards,
Andreas
PS. I'll try to write the page about debugging in the manual soon. :)
[edit]PPS. dxj beat me to the answer :)[/edit]
so nice example.
I have a few questions.
Do you support intellinse system? I tried, not output.
Is that possible we could use your debugger inside our projects? how, I am not so familar with C# projects. :)
Cheers.
I have a few questions.
Do you support intellinse system? I tried, not output.
Is that possible we could use your debugger inside our projects? how, I am not so familar with C# projects. :)
Cheers.
Quote:Original post by SiCrane
I have an example of a simple AngelScript debugger here. I haven't updated it to the most recent version yet and it uses .NET bindings, but it should give you an idea of how you can use AngelScript's debugging API.
Quote:Original post by dxj19831029
Do you support intellinse system? I tried, not output.
No, the AngelScript compiler doesn't give enough support to allow using it for code completion and the AngelScript language changes fast enough that maintaining a parallel compiler for code completion is infeasible.
Quote:
Is that possible we could use your debugger inside our projects? how, I am not so familar with C# projects. :)
If you want to use the code, feel free, but I don't provide any support for it. It's best used as a sample to create your own code.
so I have it mostly working to registered types and basic value types, but not fully for script classes.
I now have something like this to iterate through a class property set:
I can print the class properties okay, but any ideas on how to get the property values?
I imagine I use GetAddressOfVar or something similar, but for class types.
Thanks again,
Ciaran
I now have something like this to iterate through a class property set:
asIObjectType* t = context->GetEngine()->GetObjectTypeById(typeId);if(t->GetFlags() & asOBJ_SCRIPT_OBJECT){ cout << "[Class] " << type << endl; int numProperties = t->GetPropertyCount(); for(int i=0;i<numProperties; i++) { string propName = t->GetPropertyName(i); }}
I can print the class properties okay, but any ideas on how to get the property values?
I imagine I use GetAddressOfVar or something similar, but for class types.
Thanks again,
Ciaran
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement