Highlighted
Honored Contributor.
Honored Contributor.
1394 views

COBOL Source Format of invoked program when in Debug

Jump to solution

In Visual Studio 2013, Visual COBOL 2.2. ...

When you have Managed WinForms Program A invoking Managed WinForms Program B, and both are in variable source format as shown by the VS editor when editing each individually... and you are running in Debugging mode... when A invokes B and you are transitioned over to B... it appears in the old fixed Source format, with the right margin area greyed out...

Thanks.

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: COBOL Source Format of invoked program when in Debug

Jump to solution

Austin1,

I can reproduce the problem when the referenced project or assembly does not exist within the current solution. If I move it within the current solution then the sourceformat does not change.

If you would like to open a support incident for this and add my name in the description then I would be glad to create a bug report and get it fixed in a future release?

Thanks.

View solution in original post

0 Likes
5 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: COBOL Source Format of invoked program when in Debug

Jump to solution

Hi Austin1,

Can you provide more detail please? What exactly are you invoking here? Are these two programs in the same project or in different projects? Are these COBOL programs or classes?

Can you show an example of the invoke?

Thanks.

0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

RE: COBOL Source Format of invoked program when in Debug

Jump to solution

Separate Solutions.  Nothing really unusual. Just step thru it in Visual Studio debug mode and watch the source margin on the right go from white to grey as it transitions to the invoked program (class) and then back to white when it returns to the original program (class).  No harm done; just cosmetic.  In cblTest1, I added a reference to cblTest2, and they are both compiling to the same output path.

cblTest1 (Windows Application):

      class-id cblTest1.Form1 is partial

                inherits type System.Windows.Forms.Form.

      working-storage section.

      01  prog2                       type cblTest2.Form1.    *> add a Reference to this...

      method-id NEW.

      procedure division.

          invoke self::InitializeComponent

          goback.

      end method.

      method-id Form1_Load final private.

      procedure division using by value sender as object e as type System.EventArgs.

          set self::Font = new Font(self::Font, type FontStyle::Bold)

          set textBox1::Text = "Initial default data".

          invoke textBox1::Select(textbox1::Text::Length,0)

      end method.

      method-id button1_Click final private.

      procedure division using by value sender as object e as type System.EventArgs.

          set prog2                   to new cblTest2.Form1.

          set prog2::passed-info      to textBox1::Text.

          invoke prog2::ShowDialog.

          set textBox1::Text          to prog2::passed-info.  *> now back from invoked program

      end method.

      end class.

cblTest2 (Started out as a Windows App; changed to a Class Library):

      class-id cblTest2.Form1 is partial

                inherits type System.Windows.Forms.Form.

      working-storage section.

      01  passed-info                 string property.  

      method-id NEW.

      procedure division.

          invoke self::InitializeComponent

          goback.

      end method.

      method-id Form1_Load final private.

      procedure division using by value sender as object e as type System.EventArgs.

          set self::Font = new Font(self::Font, type FontStyle::Bold)

          set textBox1::Text          to passed-info.

          invoke textBox1::Select(textbox1::Text::Length,0)

      end method.

      method-id button1_Click final private.

      procedure division using by value sender as object e as type System.EventArgs.

          set passed-info             to textBox1::Text.

          invoke self::Close().

      end method.

      end class.

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: COBOL Source Format of invoked program when in Debug

Jump to solution

I don't believe this is specific to WinForms. I see it in the VS debugger all the time - the debugger source view is in fixed format, regardless of the source format set in the project settings, and so e.g. mousing over variable names that extend past the right margin doesn't work. I've never found a fix (though I haven't tried very hard, either); I just use the Auto / Local / Watch windows to view variables.

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: COBOL Source Format of invoked program when in Debug

Jump to solution

Austin1,

I can reproduce the problem when the referenced project or assembly does not exist within the current solution. If I move it within the current solution then the sourceformat does not change.

If you would like to open a support incident for this and add my name in the description then I would be glad to create a bug report and get it fixed in a future release?

Thanks.

View solution in original post

0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

RE: COBOL Source Format of invoked program when in Debug

Jump to solution

Ticket # 2874876.

Thanks,

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.