Hi,
I'm looking for a way to obtain a list of all currently loaded script files from the engine (in order to support selecting a file from a list to simplify setting of a breakpoint).
I'm using the ScriptBuilder Add-On to process #includes.
Is there a simple way to retrieve a list of all added script files from the engine, the context or similar? If not, can I possibly generate a list at the point in time when I'm using the ScriptBuilder object in my code?
Thanks so much and regards
Obtaining a list of all script files
The script engine doesn't provide a way to enumerate the script sections. That information is best obtained by modifying the CScriptBuilder to give access to the includedScripts member array.
Regards,
Andreas
Regards,
Andreas
AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game
Hi,
just wanted to wrap this up by describing what I've done, it might be useful for other people:
I now managed to obtain a list of script files from the engine by parsing all global functions and all methods of all classes, basically by using the following subset of interfaces:
This identifies all script section names (i.e. script file names) that contain code in terms of candidates for breakpoints.
Certainly, the script file names pop up multiple times during the search, i.e. must be filtered for uniqueness to obtain a useful selection list for the debugger.
Cheers,
Thomas
just wanted to wrap this up by describing what I've done, it might be useful for other people:
I now managed to obtain a list of script files from the engine by parsing all global functions and all methods of all classes, basically by using the following subset of interfaces:
// for each script module...
// global functions:
mod->GetFunctionCount()
// for each function
func = mod->GetFunctionDescriptorByIndex(i)
scriptfileName = func->GetScriptSectionName()
// methods:
obj = mod->GetObjectTypeCount()
// for each class (script object)
objType = mod->GetObjectTypeByIndex(i)
objType->GetMethodCount()
// for each method
func = objType->GetMethodDescriptorByIndex(j)
scriptfileName = func->GetScriptSectionName()
This identifies all script section names (i.e. script file names) that contain code in terms of candidates for breakpoints.
Certainly, the script file names pop up multiple times during the search, i.e. must be filtered for uniqueness to obtain a useful selection list for the debugger.
Cheers,
Thomas
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement