Print Thread
Hide instrumentation code (feature request)
#59432 01/21/19 02:57 PM
Joined: Jun 2003
Posts: 52
Lenzburg, Switzerland
T
til Offline OP
Member
OP Offline
Member
T
Joined: Jun 2003
Posts: 52
Lenzburg, Switzerland
We have a lot of debug statements in our code and probably we are not the only ones. It would be really nice to be able to hide these easily.
I'm thinking of an option where I define something like:
hide all "if..end if" blocks with condition(s) "l_debug_lvl >= g_debug_lvl","l_measure_performance".
And then I'm able to toggle this on or off easily in the editor.
Get the Idea?
Is it already there?

Re: Hide instrumentation code (feature request)
til #59438 01/22/19 09:40 AM
Joined: Aug 1999
Posts: 22,221
Member
Offline
Member
Joined: Aug 1999
Posts: 22,221
There is currently no option for this, but it's a nice idea. I have added this to the list of enhancement requests.


Marco Kalter
Allround Automations
Re: Hide instrumentation code (feature request)
Marco Kalter #59462 01/24/19 09:28 AM
Joined: Jun 2003
Posts: 52
Lenzburg, Switzerland
T
til Offline OP
Member
OP Offline
Member
T
Joined: Jun 2003
Posts: 52
Lenzburg, Switzerland
Ok, Thanks!

Re: Hide instrumentation code (feature request)
til #59467 01/24/19 04:16 PM
Joined: Apr 2003
Posts: 517
Portland, OR, USA
M
Member
Offline
Member
M
Joined: Apr 2003
Posts: 517
Portland, OR, USA
I very much like this idea. If it is implemented, please make it flexible to be able to not have if/end-if statements. Our instrumentation just has a line like zfnd_debug.log().

Re: Hide instrumentation code (feature request)
mike #59558 02/05/19 08:05 AM
Joined: Jun 2003
Posts: 52
Lenzburg, Switzerland
T
til Offline OP
Member
OP Offline
Member
T
Joined: Jun 2003
Posts: 52
Lenzburg, Switzerland
I actually have a good Idea for a possibly rather easy implementation of this feature:
We are actually using AutoReplace for our instrumented Code with *.tpl (template) files.
I imagine it could be easy to hide/expand some of the autoreplaced code by just showing the key ( and maybe the parameters used for a template).
Example:
Autoreplace:
LOG_DEBUG=LOG_DEBUG.tpl
The Template has one Parameter:
if G_Debug then alqmsg00.log_debug(G_ProcName, '&Text', G_PkgName, G_ID); end if;
So it would be nice to show in the code something like:
LOG_DEBUG('debug message') in a special color to indicate this is actually a template.
This is not the same as completly hiding the instrumentation code. But that would be an easy step from there.
So in short:
1) Add a property to a template "show template Name in Code".
2) Have three options to view the code: full, show templates as name only, templates hidden.
The reason for 1): There are templates which you don't want hidden (and probably can't hide anymore), because you will fill in code. Actually maybe it would be enough to just not hide the template if it is "broken" (=edited) but I still like the idea better to have control over which templates to make hideable.


Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.031s Queries: 14 (0.006s) Memory: 2.5187 MB (Peak: 3.0427 MB) Data Comp: Off Server Time: 2024-05-20 21:54:42 UTC
Valid HTML 5 and Valid CSS