<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://wiki.apidesign.org/skins/common/feed.css?116"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>TruffleNetBeansDebugger - Revision history</title>
		<link>http://wiki.apidesign.org/index.php?title=TruffleNetBeansDebugger&amp;action=history</link>
		<description>Revision history for this page on the wiki</description>
		<language>en</language>
		<generator>MediaWiki 1.12.0rc1</generator>
		<lastBuildDate>Fri, 01 May 2026 18:12:47 GMT</lastBuildDate>
		<item>
			<title>JaroslavTulach: New page: == Debugger in NetBeans 8.1 ==  NetBeans 8.1 and newer ships with support for debugging of Truffle languages. Here is a promotional video demonstrating how to use such feature,...</title>
			<link>http://wiki.apidesign.org/index.php?title=TruffleNetBeansDebugger&amp;diff=9178&amp;oldid=prev</link>
			<description>&lt;p&gt;New page: == Debugger in &lt;a href=&quot;/wiki/NetBeans&quot; title=&quot;NetBeans&quot;&gt;NetBeans&lt;/a&gt; 8.1 ==  &lt;a href=&quot;/wiki/NetBeans&quot; title=&quot;NetBeans&quot;&gt;NetBeans&lt;/a&gt; 8.1 and newer ships with support for debugging of &lt;a href=&quot;/wiki/Truffle&quot; title=&quot;Truffle&quot;&gt;Truffle&lt;/a&gt; languages. Here is a promotional video demonstrating how to use such feature,...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Debugger in [[NetBeans]] 8.1 ==&lt;br /&gt;
&lt;br /&gt;
[[NetBeans]] 8.1 and newer ships with support for debugging of [[Truffle]] languages. Here is a promotional video demonstrating how to use such feature, but you can try that too! Just get the most recent build of [[NetBeans]], install the [[Truffle]] Debugging Support module and get the sources:&lt;br /&gt;
&lt;br /&gt;
* Download latest daily build of [[NetBeans]] - tested on '''netbeans-trunk-nightly-201510210002-javase.zip''' downloaded from http://bits.netbeans.org/download/trunk/nightly/2015-10-21_00-02-28/zip/&lt;br /&gt;
* Install [[Truffle]] Debugging Support: Go to ''Tools/Plugins/Available Plugins'' and seek for ''Truffle'', then install.&lt;br /&gt;
* Get the latest [[GraalVM]] build from the OTN: http://www.oracle.com/technetwork/oracle-labs/program-languages/overview/index.html&lt;br /&gt;
&lt;br /&gt;
==== Installing [[Maven]] Bits and Working with Sources ====&lt;br /&gt;
&lt;br /&gt;
Assuming your [[GraalVM]] is installed in directory ''$GRAAL_VM'', continue by installing essential [[Truffle]] binaries into your local [[Maven]] repository:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ $GRAAL_VM/bin/maven_install_graalvm&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
and then you can work with the sources. First of all obtain them and switch to the correct (known to work at present time) revision: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ hg clone http://source.apidesign.org/hg/truffledebugdemo/&lt;br /&gt;
$ cd truffledebugdemo&lt;br /&gt;
$ hg up -C GraalVM-0.9&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With the sources you can now use the command line or the IDE to work with them:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
# compile:&lt;br /&gt;
$ JAVA_HOME=$GRAAL_VM mvn clean install&lt;br /&gt;
# execute&lt;br /&gt;
$ JAVA_HOME=$GRAAL_VM mvn exec:exec&lt;br /&gt;
factorial(5) = 120&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The sample prints out value of factorial for five computed in four different ([[Java]], [[Ruby]], [[JavaScript]] and our testing simple language) [[language]]s.&lt;br /&gt;
&lt;br /&gt;
==== Debugging from [[NetBeans]] ====&lt;br /&gt;
&lt;br /&gt;
Make sure [[NetBeans]] is running on the [[GraalVM]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
$ /netbeans8.1/bin/netbeans --jdkhome $GRAAL_VM&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Open the project sources in the IDE (File/Open Project, select the '''truffledebugdemo''' directory). Open ''MixLanguages.java'' source file. Put breakpoint to ''MixLanguages.java'' line 37 that invokes the global ''factorial'' symbol and debug the project (Debug/Debug Project or press Ctrl-F5). Once the breakpoint is hit, you can step-into (F7), you'll be in [[JavaScript]]. If you continue stepping in you'll get into ''simple language'' and then also into [[Ruby]]. Values of local variables will be available. Enjoy:&lt;br /&gt;
&lt;br /&gt;
{{#ev:youtube|ewdzDqPsn38}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Video]]&lt;/div&gt;</description>
			<pubDate>Tue, 01 Aug 2017 11:28:34 GMT</pubDate>			<dc:creator>JaroslavTulach</dc:creator>			<comments>http://wiki.apidesign.org/wiki/Talk:TruffleNetBeansDebugger</comments>		</item>
	</channel>
</rss>