{"id":395,"date":"2015-06-16T16:09:59","date_gmt":"2015-06-16T23:09:59","guid":{"rendered":"http:\/\/www.icetips.com\/blog_wp\/?p=395"},"modified":"2015-06-17T08:48:10","modified_gmt":"2015-06-17T15:48:10","slug":"generate-trace-file-what-does-it-mean","status":"publish","type":"post","link":"http:\/\/www.icetips.com\/blog_wp\/2015\/06\/16\/generate-trace-file-what-does-it-mean\/","title":{"rendered":"Generate Trace File &#8211; what does it mean?"},"content":{"rendered":"<p>In the Applications pad there is an option in the generate\/build buttons drop down list to \"Generate Trace File\" \u00a0Today I was wondering what this was and my first thought was that this was the template debug trace file. \u00a0But on my development virtual machine I couldn't find one even though I had found that this setting was checked.<\/p>\n<p>So I asked on the Clarion 10 newsgroup and Graham Dawson set me straight on this. \u00a0This is indeed settings for the template debug trace file.<\/p>\n<figure id=\"attachment_396\" aria-describedby=\"caption-attachment-396\" style=\"width: 523px\" class=\"wp-caption aligncenter\"><a href=\"http:\/\/www.icetips.com\/blog_wp\/wp-content\/uploads\/2015\/06\/Clarion10TraceFiles.png\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-396 size-full\" src=\"http:\/\/www.icetips.com\/blog_wp\/wp-content\/uploads\/2015\/06\/Clarion10TraceFiles.png\" alt=\"Clarion10TraceFiles\" width=\"523\" height=\"614\" srcset=\"http:\/\/www.icetips.com\/blog_wp\/wp-content\/uploads\/2015\/06\/Clarion10TraceFiles.png 523w, http:\/\/www.icetips.com\/blog_wp\/wp-content\/uploads\/2015\/06\/Clarion10TraceFiles-256x300.png 256w\" sizes=\"auto, (max-width: 523px) 100vw, 523px\" \/><\/a><figcaption id=\"caption-attachment-396\" class=\"wp-caption-text\">Trace File Options in the Applications pad in Clarion 10<\/figcaption><\/figure>\n<p>There are 3 options there: \u00a0generate, don't generate and generate by application settings. \u00a0If \"Generate Trace File\" is turned on, it is generated unconditionally. \u00a0If \"Don't Generate Trace File\" is checked, then it's not generated. \u00a0If \"Generate Trace File - Default (Application Settings)\" is on, then it's only generated if it's set in the Application Options.<\/p>\n<p><a href=\"http:\/\/www.icetips.com\/blog_wp\/wp-content\/uploads\/2015\/06\/Clarion10ApplicationOptionsTraceFiles.png\"><img loading=\"lazy\" decoding=\"async\" class=\" size-full wp-image-397 aligncenter\" src=\"http:\/\/www.icetips.com\/blog_wp\/wp-content\/uploads\/2015\/06\/Clarion10ApplicationOptionsTraceFiles.png\" alt=\"Clarion10ApplicationOptionsTraceFiles\" width=\"440\" height=\"702\" srcset=\"http:\/\/www.icetips.com\/blog_wp\/wp-content\/uploads\/2015\/06\/Clarion10ApplicationOptionsTraceFiles.png 440w, http:\/\/www.icetips.com\/blog_wp\/wp-content\/uploads\/2015\/06\/Clarion10ApplicationOptionsTraceFiles-188x300.png 188w\" sizes=\"auto, (max-width: 440px) 100vw, 440px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>So what is this Trace File? \u00a0It is a file that generates all interactions with templates during generation. \u00a0It can grow to enormous size! \u00a0For example generating an application with browses and update forms, about 100 procedures, produced a file that was 3.5 GB (yes GB as in GIGA\u00a0Bytes!) after a single generation!<\/p>\n<p>Obviously those huge files are next to useless for template debugging because of their size and that's where the #DEBUG statement comes in. \u00a0The trace file generation can be turned on or off by using #DEBUG(1) to turn it on and #DEBUG(0) to turn it off. \u00a0But it's not quite that simple as the value must by in a symbol so you have to do something like this:<\/p>\n<pre><span style=\"font-size: 12pt;\">#DECLARE(%SetDebug)<\/span>\r\n<span style=\"font-size: 12pt;\">#SET(%SetDebug,1)<\/span>\r\n<span style=\"font-size: 12pt;\">#DEBUG(%SetDebug)<\/span>\r\n<span style=\"font-size: 12pt;\">\u00a0 #! Some template code here<\/span>\r\n<span style=\"font-size: 12pt;\">#SET(%SetDebug,0)<\/span>\r\n<span style=\"font-size: 12pt;\">#DEBUG(%SetDebug)<\/span><\/pre>\n<p>This would then generate just the code in between the #DEBUG statements into the trace file.<\/p>\n<p>The default Trace File name in the Application Options is \"C:\\tpldebug.txt\" and if you force the Trace File generation with the generation\/build buttons, it is \"C:\\tpldebug2.txt\" \u00a0If you change the filename in the Application Options to just be the filename, without the driveletter, i.e. \"tpldebug.txt\" the file is generated into the folder where the application is that you are generating.<\/p>\n<p>If you feel that the generation is slower than normal, check to make sure this isn't turned on! \u00a0Even on a very fast computer generating the trace file to a SSD drive, it still slows down the generation considerably!<\/p>\n<p><em>Arnor Baldvinsson<\/em><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_395\" class=\"pvc_stats all  \" data-element-id=\"395\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"http:\/\/www.icetips.com\/blog_wp\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In the Applications pad there is an option in the generate\/build buttons drop down list to \"Generate Trace File\" \u00a0Today I was wondering what this was and my first thought was that this was the template debug trace file. \u00a0But on my development virtual machine I couldn't find one even though I had found that <a href=\"http:\/\/www.icetips.com\/blog_wp\/2015\/06\/16\/generate-trace-file-what-does-it-mean\/\" class=\"more-link\">...continue reading <span class=\"screen-reader-text\">Generate Trace File &#8211; what does it mean?<\/span><\/a><\/p>\n<div class=\"pvc_clear\"><\/div>\n<p id=\"pvc_stats_395\" class=\"pvc_stats all  \" data-element-id=\"395\" style=\"\"><i class=\"pvc-stats-icon medium\" aria-hidden=\"true\"><svg aria-hidden=\"true\" focusable=\"false\" data-prefix=\"far\" data-icon=\"chart-bar\" role=\"img\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\" class=\"svg-inline--fa fa-chart-bar fa-w-16 fa-2x\"><path fill=\"currentColor\" d=\"M396.8 352h22.4c6.4 0 12.8-6.4 12.8-12.8V108.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v230.4c0 6.4 6.4 12.8 12.8 12.8zm-192 0h22.4c6.4 0 12.8-6.4 12.8-12.8V140.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v198.4c0 6.4 6.4 12.8 12.8 12.8zm96 0h22.4c6.4 0 12.8-6.4 12.8-12.8V204.8c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v134.4c0 6.4 6.4 12.8 12.8 12.8zM496 400H48V80c0-8.84-7.16-16-16-16H16C7.16 64 0 71.16 0 80v336c0 17.67 14.33 32 32 32h464c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16zm-387.2-48h22.4c6.4 0 12.8-6.4 12.8-12.8v-70.4c0-6.4-6.4-12.8-12.8-12.8h-22.4c-6.4 0-12.8 6.4-12.8 12.8v70.4c0 6.4 6.4 12.8 12.8 12.8z\" class=\"\"><\/path><\/svg><\/i> <img loading=\"lazy\" decoding=\"async\" width=\"16\" height=\"16\" alt=\"Loading\" src=\"http:\/\/www.icetips.com\/blog_wp\/wp-content\/plugins\/page-views-count\/ajax-loader-2x.gif\" border=0 \/><\/p>\n<div class=\"pvc_clear\"><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[17,5],"tags":[198,211,209,210],"class_list":["post-395","post","type-post","status-publish","format-standard","hentry","category-clarion-10","category-technical","tag-clarion-10","tag-debug","tag-templates","tag-trace-file"],"_links":{"self":[{"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/posts\/395","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/comments?post=395"}],"version-history":[{"count":3,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/posts\/395\/revisions"}],"predecessor-version":[{"id":402,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/posts\/395\/revisions\/402"}],"wp:attachment":[{"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/media?parent=395"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/categories?post=395"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.icetips.com\/blog_wp\/wp-json\/wp\/v2\/tags?post=395"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}