locked
Debugging - stepping through FlowChart RRS feed

  • Question

  • Hi,

    Why isn't it possible to step through a flowchart and or step into an other workflow? I can't even get the callstack visible in the flowchart. Could someone please tell me is this is by design or will be fixed in the Final version of VS2010?

    (Currently using VS 2010 RC)

    Greetz,
    Dutchdre
    Wednesday, March 3, 2010 2:53 PM

Answers

  • My colleague is also able to debug normally. We compared the debugging options and found an interesting diference. The difference is the "Enable Just My Code (Managed only)" option. When this option is unchecked I'm not able to step into or step over. With this option check I could step into and step over.

    Is this by design or a bug?
    • Marked as answer by Dutchdre Thursday, March 4, 2010 6:46 PM
    Thursday, March 4, 2010 8:36 AM
  • Hi Dutchdre -

    This is by design.
    VS Tools Menu/ Options/ Enable Just My Code needs to be checked in order to be able to step into when debugging workflows.

    Another thing to keep an eye for is when moving the project to another physical location in HD or another computer.
    To enable workflow debugging after moving the project to another location, press Ctrl+S to save all (save icon will not force save) and force an update to the location of the XAML file within your workflow. Modifying the workflow and selecting to run would also work (also forces save).

    I hope this helps,
    Naiana

    • Marked as answer by Dutchdre Thursday, March 4, 2010 6:46 PM
    Thursday, March 4, 2010 6:02 PM

All replies

  • do you mean you are trying to debug flowchart designer, and you want to step into the flowchart designer and other workflow designer which contain child activities in it?

    Wednesday, March 3, 2010 6:35 PM
  • I just tried out the following scenario and didn't have any issues:

    -Created a workflow console application
    -Added a sequence to the workflow
    -Added a flowchart to the sequence
    -Added a second sequence to the flowchart
    -Connected the start node of the flowchart to the second sequence
    -Set a breakpoint on the first sequence (the root workflow)
    -Started debugging
    -Used F11 to step through each activity

    I was able to debug into the flowchart...

    Can you provide a set of repro steps to try out?

    Hope this helps,
    Eric
    Wednesday, March 3, 2010 9:58 PM
  • are you setting up the flowlink to your child activities in flowchart?
    if not, it shouldn't step into even you set breakpoint.
    Wednesday, March 3, 2010 10:18 PM
  • I just tried out the following scenario and didn't have any issues:

    -Created a workflow console application
    -Added a sequence to the workflow
    -Added a flowchart to the sequence
    -Added a second sequence to the flowchart
    -Connected the start node of the flowchart to the second sequence
    -Set a breakpoint on the first sequence (the root workflow)
    -Started debugging
    -Used F11 to step through each activity


    Using the above scenario I'm not able to step into the sequence. When I hit F11 on the first breakpoint (on the root Sequence) it doesn’t break in to the flowchart. I have to set a breakpoint on each activity in order to step through the complete flow.

    I've also used the following scenario:
    - New workflow console application
    - Added a sequence to the workflow
    - Added a 3 delay activities to the sequence
    - Breakpoint on the first delay activity

    When I debug the above scenario and the debugger breaks on the first delay activity I'm not able to step over (F10) the only thing it does is stepping out of the flow. If I want to break on the second or third delay activity I've to set a breakpoint on each activity.

    And another scenario is not working for me:
    - New workflow console application
    - Added a flowchart to the workflow
    - Added a flowdecision (A) to the flowchart (Condition: "1 = 1")
    - Added two delay activities (B, C) each on a side of the decision. (B) connected with the True label of (A) and (C) connected with False of (A).

    I'm not able to break on the flowdecision and I've to set breakpoints on (B) and (C) to determine with path of the flow is executed.

    We primarily use the flowchart to visualize our system processes. The processes are currently hard coded using the fabulous spaghetti method in our legacy systems. WF now visualizes our processes in an awesome way but debugging is stumbling at this moment.

    Thursday, March 4, 2010 8:00 AM
  • Yes I did, the workflows working pretty nice but debugging breaks my head.
    Thursday, March 4, 2010 8:02 AM
  • this is very strange. Because I can't repro on my RC build machine.

    what's the save path of your project you save on your local machine? does it contain any special symbol?


    Thursday, March 4, 2010 8:23 AM
  • My colleague is also able to debug normally. We compared the debugging options and found an interesting diference. The difference is the "Enable Just My Code (Managed only)" option. When this option is unchecked I'm not able to step into or step over. With this option check I could step into and step over.

    Is this by design or a bug?
    • Marked as answer by Dutchdre Thursday, March 4, 2010 6:46 PM
    Thursday, March 4, 2010 8:36 AM
  • Hi Dutchdre -

    This is by design.
    VS Tools Menu/ Options/ Enable Just My Code needs to be checked in order to be able to step into when debugging workflows.

    Another thing to keep an eye for is when moving the project to another physical location in HD or another computer.
    To enable workflow debugging after moving the project to another location, press Ctrl+S to save all (save icon will not force save) and force an update to the location of the XAML file within your workflow. Modifying the workflow and selecting to run would also work (also forces save).

    I hope this helps,
    Naiana

    • Marked as answer by Dutchdre Thursday, March 4, 2010 6:46 PM
    Thursday, March 4, 2010 6:02 PM
  • Thanks for your fast reply. Could you please explain why the "Just my code" option needs to be checked in order to step into when debugging workflows?

    Also thanks for your additional explanation about (forced) saving the workflows.

    Thursday, March 4, 2010 6:51 PM
  • Hi Dutchdre -

    Just my code is required due to Workflow debugging architecture which is based on the following : http://blogs.msdn.com/jmstall/archive/2005/07/27/state-machine-theory.aspx
    Just My Code allows the step-into specific states(activities) without noise.

    I hope this helps,
    Naiana

    Thursday, March 4, 2010 7:24 PM
  • Naiana,

    Nice and clear explanation! Thank you very much for your help.

    Dutchdre
    Thursday, March 4, 2010 8:43 PM
  • My pleasure!

    J

    Thursday, March 4, 2010 9:02 PM