<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Debugging: values of variables?]]></title><description><![CDATA[<p dir="auto">If I want to do a little development work - which in my case is simply creating a few small functions - some debugging facility is necessary.  I know that (at least in Firefox) I can write to the Web Console with the JavaScript function <code>console.log</code> - but are there are other debugging facilities?  This might seem like a dumb question, but I've only ever used JavaScript in the context of (Open)JSCAD, so I know nothing about generic JavaScript debugging.  How do you step through a script or program, checking values of variables on the way?  Add breakpoints?</p>
<p dir="auto">As always, many thanks!<br />
Alasdair</p>
]]></description><link>https://openjscad.nodebb.com/topic/184/debugging-values-of-variables</link><generator>RSS for Node</generator><lastBuildDate>Thu, 13 Aug 2026 14:28:38 GMT</lastBuildDate><atom:link href="https://openjscad.nodebb.com/topic/184.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 22 Oct 2020 05:25:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Debugging: values of variables? on Thu, 11 Mar 2021 18:31:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/z3dev" aria-label="Profile: z3dev">@<bdi>z3dev</bdi></a> Hey! Thanks for the reply and the welcome, appreciated. I tried <a class="plugin-mentions-user plugin-mentions-a" href="/user/danmarshall" aria-label="Profile: danmarshall">@<bdi>danmarshall</bdi></a> app and it works as I was expected. I tried the console.log with the web + debug console in safari and chrome (on mac) but didn't get anything printed.</p>
<p dir="auto">It's any other post with other tools for debugging available or it's still in development? (I'm using vsc)<br />
Thanks.</p>
]]></description><link>https://openjscad.nodebb.com/post/697</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/697</guid><dc:creator><![CDATA[tubaro1]]></dc:creator><pubDate>Thu, 11 Mar 2021 18:31:59 GMT</pubDate></item><item><title><![CDATA[Reply to Debugging: values of variables? on Wed, 10 Mar 2021 21:48:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/tubaro1" aria-label="Profile: tubaro1">@<bdi>tubaro1</bdi></a> welcome.</p>
<p dir="auto">Those messages from console.log() should output to the Console of any of the browsers. Try a simple text message such as console.log(“hi”)</p>
<p dir="auto">As for debugging designs, the WEB UI uses worker threads for compiling the designs. This keeps the UI responsive while the compile is running. Good for the general users but not for serious designs, as setting break points and interrogating variables becomes almost impossible.</p>
<p dir="auto">If still interested then <a class="plugin-mentions-user plugin-mentions-a" href="/user/danmarshall" aria-label="Profile: danmarshall">@<bdi>danmarshall</bdi></a> has put together a small application that does the compile in the main thread. But you’ll need to download and install the application. See <a href="https://github.com/danmarshall/jscad-now" rel="nofollow ugc">https://github.com/danmarshall/jscad-now</a></p>
]]></description><link>https://openjscad.nodebb.com/post/693</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/693</guid><dc:creator><![CDATA[z3dev]]></dc:creator><pubDate>Wed, 10 Mar 2021 21:48:59 GMT</pubDate></item><item><title><![CDATA[Reply to Debugging: values of variables? on Tue, 09 Mar 2021 21:26:19 GMT]]></title><description><![CDATA[<p dir="auto">Beforehand, my apologies to revive this old thread, I'm currently developing in the v2 of JSCAD, I tried with console.log on a subpart, which successfully compiles but if I open the console (with Chrome on Mac) i'm not able to see any comment or var printed on screen. I'm missing something?</p>
<p dir="auto">In a recent post from <a class="plugin-mentions-user plugin-mentions-a" href="/user/z3dev" aria-label="Profile: z3dev">@<bdi>z3dev</bdi></a> the scope was fixed, I don't know if its related to this, if not, it's any other way to see a log?</p>
<p dir="auto">Thanks guys!</p>
]]></description><link>https://openjscad.nodebb.com/post/692</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/692</guid><dc:creator><![CDATA[tubaro1]]></dc:creator><pubDate>Tue, 09 Mar 2021 21:26:19 GMT</pubDate></item><item><title><![CDATA[Reply to Debugging: values of variables? on Thu, 22 Oct 2020 10:12:47 GMT]]></title><description><![CDATA[<p dir="auto">Same here, I only use console.log in Firefox, and I even used it on some scripts to export data before I knew how to use localStorage.</p>
]]></description><link>https://openjscad.nodebb.com/post/490</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/490</guid><dc:creator><![CDATA[gilboonet]]></dc:creator><pubDate>Thu, 22 Oct 2020 10:12:47 GMT</pubDate></item><item><title><![CDATA[Reply to Debugging: values of variables? on Thu, 22 Oct 2020 09:43:03 GMT]]></title><description><![CDATA[<p dir="auto">I just use console.log in Chrome(mostly prefer ti vs debug <img src="https://openjscad.nodebb.com/assets/plugins/nodebb-plugin-emoji/emoji/android/1f604.png?v=552b9a4dc0c" class="not-responsive emoji emoji-android emoji--smile" style="height:23px;width:auto;vertical-align:middle" title=":smile:" alt="😄" />  ), and I think debug breakpoints are not possible due to way user scripts are loaded (I may be wrong on this one).</p>
]]></description><link>https://openjscad.nodebb.com/post/489</link><guid isPermaLink="true">https://openjscad.nodebb.com/post/489</guid><dc:creator><![CDATA[hrgdavor]]></dc:creator><pubDate>Thu, 22 Oct 2020 09:43:03 GMT</pubDate></item></channel></rss>