CASE: use debug mode

On company level, you can use the debug mode for any account or reconciliation template. This is greatly beneficial in order to have more detailled info on what a template is doing, without having to dive into the code without seeing the output (on firm level, you’ll never see that).

How to activate?

When you are on company level within the page that show the output of the template (account or reconciliation, so when you are viewing the details of those), simply add ?debug=1 at the end of the URL, and press ENTER.

Like this eg:
Screen Shot 2020-05-04 at 09.52.03

After pressing ENTER, a new section will be loaded right beneath the details of the template, looking like this:

There’s some new info we added in here, in particular the flame graphs!

Let’s see what we got:

A: information on the template, and where it is linked at on firm level. You this link guides you to firm level where the template is maintenanced.
Screen Shot 2020-05-04 at 09.58.15
The mother level is only applicable for templates that come from the Silverfin Marketplace, mind you. So if you built custom templates on firm level, you’ll only see the Firm level link.

B: this is the amount that has an impact on the reconciliation of a template.
Screen Shot 2020-05-04 at 10.01.29

C: these are all the result tags that are made in the template.
Screen Shot 2020-05-04 at 10.06.39
This is actually great, as you don’t have to dive into the code looking for variables which you need to refer to in other templates :bulb:

D: this show you if a certain input isn’t filled with information while it is needed (see the required case here)
Screen Shot 2020-05-04 at 10.10.33

E: this overviews which inputs all can be filled with details through the Import reconciliation data function:
Screen Shot 2020-05-04 at 10.13.22

Here’s an example:
Screen Shot 2020-05-04 at 10.13.42
It shows you the name of the inputs, with the placeholder that is used in the Import reconciliation data screen.

F: the text properties is technical information on what inputs holds which information (basically, it holds the information on what makes the details of a template)
Screen Shot 2020-05-04 at 10.15.30

G: this will give you an overview of all used translation tags
Screen Shot 2020-05-04 at 10.18.38

H: if you use certain roll forward logic, it’ll be displayed here in a handy overview. Great to check when copying details isn’t working as the way you expect it to be
Screen Shot 2020-05-04 at 10.20.11

I: the dependencies will show you what impacts the details of the template. That can be account ranges from account collections, certain results that are used from other templates, the ledgers of an account (the booking lines, or the total of it), …

J: flame graphs :fire:
Screen Shot 2020-05-04 at 10.25.03
This was added currently, and is a great way on investigating if eg. your template would be slow to load.

You can hover over a block (which presents a certain coding function, eg. the start of a fori-loop), and show you on how many time it takes to complete the code in mili-seconds.

You can click on the block you need to investigate (each block shows the line number of where the code starts), and all the blocks beneath it are parts of your selected block (so all sub-blocks will have a total of mili-seconds that equal the amount of time of your selected block).
Screen Shot 2020-05-04 at 10.30.00

To go back, just click on any block above your selected block to go to another block (or just click on template to go to the complete overview).

This is a great way on not only to see how many time it takes for your template to load, but also to optimise where needed, and make your template even render faster! :muscle:

TIP: to save you time typing out ?debug=1 in the URL, you can also create a bookmark in your browser of choice (Chrome eg), with the following Java-script:

javascript:void((function(){var locHasAnchor = location.href.split('#').length > 1 ? true : false; var loc = locHasAnchor ? location.href.split('#')[0] : location.href; var anchor = locHasAnchor ? '#' + location.href.split('#')[1] : '';if (loc.indexOf('debug') >= 0) return; loc.indexOf("?") < 0 ? (location.href = loc+"?debug=1"+anchor) : (location.href = loc+"&debug=1"+anchor);})());

This creates a bookmark you just click on whenever you want to debug a Silverfin template; it’ll automatically add the needed settings into your URL :bulb:

5 Likes

This is awesome! This will help a lot in debugging, thank you for sharing @sven!

2 Likes

FYI all, added some more detail to the case and our newly added flame graphs function! :fire:

1 Like

This is awesome. Why isn’t it in the dev docs though? An overview of the debug functionality and how to activate it (or even just a reference to this post) should be mentioned in capital letters right at the start of the developer docs!

Happy that I stumbled upon this post, but would’ve also been nice some weeks ago :slight_smile:

Hello @Wsteppe,

We have to agree with you. Unfortunately (as you have noticed), we maintain 2 different things here (developer site and the community), and there is an overlap in which we need to become better on communicating to you future developers. Sorry 'bout that.

Just know we are aware of this, and we hope to bring change in this into the near future.

Thanks for your honest feedback :muscle:

1 Like

I’ve used this for some time and that worked fine, but since last week this doesn’t work anymore. So when I put “?debug=1” at the end, nothing is showing. I’ve asked a colleague of me and he doesn’t see it also. (so it’s not my PC). Is there something else why this shouldn’t work anymore?

I have the same problem

Hi, is there anyone who knows what the problem could be?

Hi Peter,

Try adding &debug=1 at the end of the url instead and let us know if it works.

Best,
Borja

Hi Borja,

No, &debug=1 instead of ?debug=1 also doesn’t work. It"s strange because it has work before on the PC I’m currently working on and also Julie had this problem, so it should not a problem of my PC.

Hi Peter,

I have been investigating and it seems that the debug mode does not work in templates that are part of a paying package in Silverfin. We will give you an update if this changes in the future.

In the meantime if there is anything we can help you with regarding a specific issue please let us know.

Best,
Borja

Ok, thanks Borja, that has changed then, because it did work a few weeks ago.

Now some of my calculations are useless because you changed some result tags and I have no way of finding the correct tags.
Is there anyway we can still get this information? :frowning:

Hi Julie,

It is possible to create a template containing an (automatically generated) overview of all result tags within each template.

Please refer to the following case which we created for this purpose:

Creating such a template will grant you a way to stay up to date with all result tags (which, unfortunately, may sometimes change due to a necessary update).

Please let us me know if you have any questions about this.

Regards,

Laurent

We’ve added a new section into the debug pane, called the Dependencies tree. All info can be found here:

TIP: to save you time typing out ?debug=1 in the URL, you can also create a bookmark in your browser of choice (Chrome eg), with the following Java-script:

javascript:void((function(){var locHasAnchor = location.href.split('#').length > 1 ? true : false; var loc = locHasAnchor ? location.href.split('#')[0] : location.href; var anchor = locHasAnchor ? '#' + location.href.split('#')[1] : '';if (loc.indexOf('debug') >= 0) return; loc.indexOf("?") < 0 ? (location.href = loc+"?debug=1"+anchor) : (location.href = loc+"&debug=1"+anchor);})());

Screen Shot 2021-10-01 at 08.29.39

This creates a bookmark you just click on whenever you want to debug a Silverfin template; it’ll automatically add the needed settings into your URL :bulb:

We’ve added a new section to the debug pane, in which a check is performed on which version the template is running on company level and firm level.

Whenever there is a difference, a warning will be shown now:

This might become useful for debugging just to be sure you are debugging the latest code (firm code) with the output of the template on company level.

An example could be if the company has his period locked, blocking all future updates of that template on firm level being executed on company level:

Hi Sven, adding “?debug=1” does not work for me…?

This link does not generate any debug mode for instance:
https://live.getsilverfin.com/f/106/reconciliation_texts/2622684/edit?debug=1

How should I use this please?

Gr. Ward

Hi @Warde ,

Debug mode only shows template details on company level. The URL you provided is a link to the template on firm level.

So you’ll have to access a template in a specific company and and ?debug=1 to the URL in there. That should work fine. If not, please reach out.

Thanks! :slight_smile:

Kind regards
Robin

Ok, tx Robin, but what is the difference between company and firm level please?