"Add watch" option in the Macro developement window

edited March 2014 in KLayout Development
Hi Matthias-

When I worked with VB debuggers I noticed that "add watch" is very usefull.
You select certain parameter in you code, and while stepping into the code lines the macro window constantly display this parameter value.
So it helps with debugging.

Maybe similar feature can be added sometime.

Thanks, Itamar

Comments

  • edited November -1

    Hi Itamar,

    Ruby is not VB and I am not sure whether it can be done within the constraints of the Ruby interpreter. I'll have a look into the ruby debugger and check whether I can copy their implementation if there is one.

    Matthias

  • edited November -1

    Itamar,

    I'm not sure this really buys you anything. You can do what you want with only slightly more effort -- either set a breakpoint or step through the code using F11 or the "Step into procedure" button at the top, and then at any point you can type in the console to read out values of variables.

    For example if I want to track how the value of a variable "vars" changes, then I just press F11 until I've stepped down to a line of interest, and then I type "vars" in the console input to see what the value is.

    The only down-side I'd see is that the output window above the console strangely does not auto-scroll while pressing F11 and interacting with the console. So you have to keep scrolling down after typing "vars" to be able to see what it output.

    Does this work well enough for you?

    David

  • edited November -1

    Hi David,

    I see what you mean - it's not that you like to create a watchpoint which triggers a debugger halt when the value is changed. That will be difficult but adding expressions that are evaluated automatically will be feasible.

    On the contrary I would like to keep the debugger lean. I'm already digging into the guts of the Ruby interpreter and that will complicate the task of maintaining compatibility with various Ruby versions.

    Matthias

  • edited November -1
    Hi David-

    I was not aware of this option.
    It is a manual process (I can't just keep pressing F11 and watch the value change), but it does cover what I need.

    Thanks!
Sign In or Register to comment.