[SOLVED] Setting up a Proxy QScriptEngineAgent for script monitoring.
I am using the QScriptEngine and QScriptEngineDebugger and I was reading the documentation of the QScriptEngine and I saw the following:
"void QScriptEngineDebugger::attachTo ( QScriptEngine * engine )
Attaches to the given engine.
The debugger will install a custom agent (using QScriptEngine::setAgent()) to monitor the engine. While the debugger is attached, you should not change the agent; however, if you do have to perform additional monitoring, you must set a proxy agent that forwards all events to the debugger's agent."
So what I would like to do setting this Proxy Agent in some way and forward all events to the custom ScriptAgent the Debugger sets to the engine.
The reason of doing this is because when I try to use the Debugger and call some imported extension functions I don't the current text being executend... only I can only see the line number.
I couldn't find any example regarding this topic.
Thanks in advance any kind of help is welcome :O
Hello Just to mentio that I solved my issue with some concept easier than implementing the so called "proxy Agent"
My issue :
Using the script engine debugger I could not see the code inside my imported extensions, I could only see the line number as I tried to step into this imported functions.
I was importing my extensions BEFORE I use the function attachTo() of QScriptEngine to attach the QScriptDebugger.
Background is that QScriptDebugger sets a Custom QScriptAgent as soon as it is attached to the ScriptEngine.
What I only did is attach the QScriptEngineDebugger BEFORE I import the extensions, by doing that the custom Agent is available when the extensions are imported and everything else (stepping into, Loaded script list, stack) works just fine inside the Debugger Widget.
In case someone runs into kind of problem in the future I this worked for me :D