Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [SOLVED] Setting up a Proxy QScriptEngineAgent for script monitoring.
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Setting up a Proxy QScriptEngineAgent for script monitoring.

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 979 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    Qnoobish
    wrote on last edited by
    #1

    Hello,

    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

    In short, software is eating the world.

    1 Reply Last reply
    0
    • Q Offline
      Q Offline
      Qnoobish
      wrote on last edited by
      #2

      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.

      Solution:
      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

      In short, software is eating the world.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved