
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
I am using Microsoft Visual Studio Community 2019 Version 16.7.3. I am able to "Step Into" "F11" with no problem. But if I choose to "Add Watch" (see screen shot) on a variable, my environment freezes up. I have included a screen shot of my Debug Options. I really need this option in order to debug my program.
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Chris,
It looks like the stack size was indeed the culprit. Yes, I received a Stack Overflow Exceptions error a month ago. I read an articles at the following link: https://community.microfocus.com/t5/Visual-COBOL-Knowledge-Base/Diagnose-and-fix-Stack-Overflow-exceptions-in-Visual-COBOL/ta-p/1743761#
The article suggested that a program change can usually solve the problem. I did not choose this avenue because it would have required a substantive change to the program given that it contains nested performs. The article also suggested increasing the stack size to ILSTACKSIZE(2097152) which is 2mb. But that amount of space did not work so I just kept increasing it until it worked with ILSTACKSIZE(99097152) which I believe is 9mb. I just changed the stack to ILSTACKSIZE(89097152) which is 8mb and it seemed to have solved the 'Add Watch" problem. I also tested the program that was giving me a stack over flow after decreasing the ILSTACKSIZE size to see if it would give me an error and it seems to be working fine.
What is the best recommendation with stack sizing? I would like to decrease it as much as possible but am concerned that it will give me stack overflows in my programs.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
When does the freeze occur, is it directly after the Add Watch or after pressing F11 after the Add Watch?
Does this same behavior occur with all variables that you add to a watch or just this specific variable?
Does this behavior occur in other projects such as one of the managed projects in the Samples Browser?
Which product version are you using, VC 6.0?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
The freeze occurs after the Add Watch and it happens with any variables I Add Watch to.This seems to be a problem with only one solution. In troubleshooting this problem, I found that if I add a Breakpoint at the beginning of the executable program, then it does not freeze when I Add Watch. But I do get, however, an Exception Unhandled error if I add to many Add Watch (see screen shot). I am using VC 5.0. This solution simply does not like the Add Watch and I do not know why.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Can you send this particular solution to me so that I can test with it here? You can either zip it up and attach it here or email it to me at chris.glazier@microfocus.com.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
The solution has two projects: A Windows Form Application project and a Procedural Multi-OutPut Project. The DLL's zip contains all the programs for the Procedural Multi-Output project. I created a new solution with the same programs to see if the same problem persisted which they did. So I am at a loss as to what could be triggering this problem.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Chris,
If I put a BreakPoint anywhere before the first form in the project is displayed, then I am able to Add Watch to any variable and am able to add as many Add Watches as I want. I suppose this will be my solution for now but this surely is strange.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
There are a couple of copybook folders that are missing so I cannot recompile the application.
C:\Mifocus1WF\COPYLIBS
C:\Mifocus1WF\COB
Any chance you can send these?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
I can now build the solution without errors. I can single step into the application and add Watch variables and it does not hang.
Do I have to be able to run to a certain point in the application before the error exhibits itself?
Is it possible for you to reproduce the error within the application prior to the point where the data files are being accessed?
This assembly size is over 5MB and I see that you are setting ILSTACKSIZE(99097152). Were you running into stack overflow errors previously?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Chris,
It looks like the stack size was indeed the culprit. Yes, I received a Stack Overflow Exceptions error a month ago. I read an articles at the following link: https://community.microfocus.com/t5/Visual-COBOL-Knowledge-Base/Diagnose-and-fix-Stack-Overflow-exceptions-in-Visual-COBOL/ta-p/1743761#
The article suggested that a program change can usually solve the problem. I did not choose this avenue because it would have required a substantive change to the program given that it contains nested performs. The article also suggested increasing the stack size to ILSTACKSIZE(2097152) which is 2mb. But that amount of space did not work so I just kept increasing it until it worked with ILSTACKSIZE(99097152) which I believe is 9mb. I just changed the stack to ILSTACKSIZE(89097152) which is 8mb and it seemed to have solved the 'Add Watch" problem. I also tested the program that was giving me a stack over flow after decreasing the ILSTACKSIZE size to see if it would give me an error and it seems to be working fine.
What is the best recommendation with stack sizing? I would like to decrease it as much as possible but am concerned that it will give me stack overflows in my programs.