Sign in to follow this  

Obtaining a list of all script files

Recommended Posts


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

Share this post

Link to post
Share on other sites

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:
// for each function
func = mod->GetFunctionDescriptorByIndex(i)
scriptfileName = func->GetScriptSectionName()
// methods:
obj = mod->GetObjectTypeCount()
// for each class (script object)
objType = mod->GetObjectTypeByIndex(i)
// 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.


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this