<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[My Visual Database — my solution to debug errors]]></title>
		<link>https://myvisualdatabase.com/forum/viewtopic.php?id=8737</link>
		<atom:link href="https://myvisualdatabase.com/forum/extern.php?action=feed&amp;tid=8737&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in my solution to debug errors.]]></description>
		<lastBuildDate>Sun, 22 Oct 2023 01:15:23 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: my solution to debug errors]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=49338#p49338</link>
			<description><![CDATA[<p>other..</p><div class="codebox"><pre><code>var
   mydebug: boolean = true; // false disable all breakpoints

procedure m(lbl:string;txt: variant);
//*** Proc 851 - minha solução para depurar...
begin
   if mydebug then
       showmessage(lbl + vartostr(txt));
end;

examples:

m(&#039;Edit1: &#039;,frmLogin.Memo_tp2.text);
m(&#039;sKey: &#039;,sKey);</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (jrga)]]></author>
			<pubDate>Sun, 22 Oct 2023 01:15:23 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=49338#p49338</guid>
		</item>
		<item>
			<title><![CDATA[Re: my solution to debug errors]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=49239#p49239</link>
			<description><![CDATA[<p>It&#039;s also a good option and you understand my intention to interact with the keyboard as little as possible...</p>]]></description>
			<author><![CDATA[null@example.com (jrga)]]></author>
			<pubDate>Mon, 16 Oct 2023 17:03:39 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=49239#p49239</guid>
		</item>
		<item>
			<title><![CDATA[Re: my solution to debug errors]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=49238#p49238</link>
			<description><![CDATA[<p>but if you really want to have the minimal keyboard interaction when changing the uses, then i&#039;m thinking something like this</p><div class="codebox"><pre><code>procedure m(aMsg: Variant);
begin
    ShowMessage(VarToStr(aMsg));
end;
procedure xm(aMsg: Variant);
begin
    // do nothing
end;

m(1);
m(&#039;two&#039;);

xm(1);
xm(&#039;two&#039;);</code></pre></div><p>adding/removing x before the test will just take 1 keystroke from your keyboard. rather than delete, then typing 1 or 0.</p>]]></description>
			<author><![CDATA[null@example.com (brian.zaballa)]]></author>
			<pubDate>Mon, 16 Oct 2023 16:35:19 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=49238#p49238</guid>
		</item>
		<item>
			<title><![CDATA[Re: my solution to debug errors]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=49237#p49237</link>
			<description><![CDATA[<p>Hi brian.zaballa, putting // is also a good alternative. Thanks for the feedback</p>]]></description>
			<author><![CDATA[null@example.com (jrga)]]></author>
			<pubDate>Mon, 16 Oct 2023 16:27:51 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=49237#p49237</guid>
		</item>
		<item>
			<title><![CDATA[Re: my solution to debug errors]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=49236#p49236</link>
			<description><![CDATA[<p>im using a similar procedure to this one.</p><div class="codebox"><pre><code>procedure sm(aMsg: Variant);
begin
    ShowMessage(VarToStr(aMsg));
end;

sm(1);
sm(&#039;two&#039;);</code></pre></div><p>i&#039;m curios to what will be the use case of v: integer.<br />are you perhaps want to disable the message before deploying your application?<br />if so, I would rather comment the line, than looking for all my uses of the procedure<br /></p><div class="codebox"><pre><code>begin
    // ShowMessage(VarToStr(aMsg));</code></pre></div><p>or if you want to keep the test, then why not just comment the line of the test.</p><div class="codebox"><pre><code>sm(1);
// sm(&#039;two&#039;);</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (brian.zaballa)]]></author>
			<pubDate>Mon, 16 Oct 2023 16:23:11 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=49236#p49236</guid>
		</item>
		<item>
			<title><![CDATA[my solution to debug errors]]></title>
			<link>https://myvisualdatabase.com/forum/viewtopic.php?pid=49235#p49235</link>
			<description><![CDATA[<p>This is my solution to help with debugging errors. If anyone can improve this idea or offer better alternatives, I would appreciate it.</p><br /><div class="codebox"><pre><code>procedure m(txt: variant; v: integer);
//*** minha solução para depurar...
begin
   if v = 1 then
       showmessage(vartostr(txt));
end;

Examples:

a = 1;
b = &#039;one&#039;;

displays message
m(a,1) 
m(b,1) 

or keep it in the code to display if necessary:

m(a,0);
m(b,0);</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (jrga)]]></author>
			<pubDate>Mon, 16 Oct 2023 14:41:55 +0000</pubDate>
			<guid>https://myvisualdatabase.com/forum/viewtopic.php?pid=49235#p49235</guid>
		</item>
	</channel>
</rss>
