Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Despite DebuggerHidden/DebuggerStepThrough debug still stops there 15 Mar 2023 14:19 #25638

  • ic2
  • ic2's Avatar
  • Topic Author


  • Posts: 1662
  • Following this subject: www.xsharp.eu/forum/public-product/3089-...gerstepthrough#23218

    I added the following:
    [System.Diagnostics.DebuggerHidden()];
    Function ReturnVar (etc)

    (I also tried [DebuggerStepThrough]; instead)

    Nevertheless, when I debug in VS, using Step, the debugger lands in the following line, about halfway the code in that function:
    nRes := AScan(aLocalSysVars, {|aVal| Upper(aVal[1]) == cSearch})

    I have to pres F11 many times (really no idea what it is doing) before I finally return to where I wanted to go directly in the first place. In fact, I am worse off without that Debugger statement because then I can use Step Out and here it doesn't work.

    I have added #using System.Diagnostics on the top of the program where the function can be found.

    What could be the cause?

    Dick

    Please Log in or Create an account to join the conversation.

    Last edit: by ic2.

    Despite DebuggerHidden/DebuggerStepThrough debug still stops there 15 Mar 2023 14:26 #25639

    • robert
    • robert's Avatar


  • Posts: 3588
  • Dick,
    I am not 100% sure, but I suspect that the following is happening:
    - the codeblock code gets converted to a compiler generated class
    - the body of the block becomes the body of the EvalBlock() method of that class
    - we did not add the attributes from the function where the block was declared to that method

    I will see if we can "teach" the compiler to apply these attributes to the compile time codeblocks that are declared inside a method too.

    Robert
    XSharp Development Team
    The Netherlands

    Please Log in or Create an account to join the conversation.

    Despite DebuggerHidden/DebuggerStepThrough debug still stops there 16 Mar 2023 10:37 #25664

    • ic2
    • ic2's Avatar
    • Topic Author


  • Posts: 1662
  • Hello Robert,

    Thanks. It seems I once again added something to the endless X# ToDO list.

    I have removed the DebuggerHidden statement.

    Once again I must conclude that CA had a great design wit h the entity based VO repository where any debug setting (entity but also MEF, AEF) is arranged in seconds and also works. I guess it was also easier for the developers to get it working than for you in VS.

    Dick

    Please Log in or Create an account to join the conversation.

    • Page:
    • 1