PR# 19656 [er] Disabling CAT-call exceptions in a config file

Problem Report Summary
Submitter: axarosenberg
Category: EiffelStudio
Priority: High
Date: 2020/07/08
Class: Feature Request
Severity: Critical
Number: 19656
Release: 20.05
Confidential: No
Status: Closed
Responsible:
Environment: win
Synopsis: [er] Disabling CAT-call exceptions in a config file

Description
Currently when we want to disable CAT-call exceptions in EiffelStudio, we have to set it in the menu entry Execution->Exception handling...
We'd like to have a way to disable it in some config files instead of manually from within EiffelStudio. Either in the ECF file or in a file in $ISE_EIFFEL/studio/{eifinit,config}.
With such configuration, we would be able to disable CAT-call exceptions once and for all. We just spent hours in the debugger, and just before reaching the code we wanted to debug we got a CAT-call exception. This is very frustrating because we now have to disable it manually in EiffelStudio and rerun the program for hours in the debugger before reaching the same point. That's many hours lost, which could have been avoided if we have had a way to disable CAT-call detection in a config file once and for all without the possibility to forget setting it in EiffelStudio when we recompile the project.

--
Eric Bezault
To Reproduce

										
Problem Report Interactions
From:alexk_es    Date:2020/08/09    Status: Closed    Download   
Fixed in rev#104575 of EiffelStudio 20.11 intermediate release by adding preferences to set default values whether CAT-calls are reported in the console and in the debugger. The corresponding preferences names are

   debugger.default_catcall_console_warning
   debugger.default_catcall_debugger_warning

respectively. They can be modified in `.../studio/eifinit/default.xml` if needed.

When a project is compiled, the corresponding options are set from these defaults and are saved in the associated session data for later use. After restart, the CAT-call options are retrieved from the session data (if available), not from the preferences. This ensures the debugging settings are preserved across multiple EiffelStudio sessions for the same project.

Note. To remove debugger session data for a project on Windows, do

   del /q "%APPDATA%\..\Local\Eiffel Software\.es\XX.YY\session\ZZ.*.dbg.exceptions_handler.xml"

where XX.YY is EiffelStudio version number (e.g. 20.05) and ZZ is the project UUID.

From:alexk_es    Date:2020/07/16    Status: Analyzed    Download   
State of the flags indicating whether CAT calls should be reported or not was expected to be recorded for a debugging session, so that when EiffelStudio was restarted, the flags should have the value set last time. Due to a bug, this state was not saved. As a result, after closing and opening EiffelStudio for the same project, the flags were unset. This bug is going to be fixed.

We can also add settings that can be used as defaults for the flags when a project is open for the first time. It can be done either in preferences (for all projects) or in ECF (for a particular project or even project target). Which one seems to be more suitable?

To summarize, the flags would be set using the following rules:
1. Use settings for CAT-call detection from the previous session if available.
2. Retrieve default settings for CAT-call detection otherwise.

Would it be OK?