<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Debugging Archives - Philipp Salvisberg&#039;s Blog</title>
	<atom:link href="https://www.salvis.com/blog/tag/debugging/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.salvis.com/blog/tag/debugging/</link>
	<description>Database-centric development</description>
	<lastBuildDate>Thu, 24 Jul 2025 16:10:40 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>

<image>
	<url>https://www.salvis.com/blog/wp-content/uploads/2014/04/favicon.png</url>
	<title>Debugging Archives - Philipp Salvisberg&#039;s Blog</title>
	<link>https://www.salvis.com/blog/tag/debugging/</link>
	<width>32</width>
	<height>32</height>
</image> 
<atom:link rel="hub" href="https://pubsubhubbub.appspot.com"/>
<atom:link rel="hub" href="https://pubsubhubbub.superfeedr.com"/>
<atom:link rel="hub" href="https://websubhub.com/hub"/>
<atom:link rel="self" href="https://www.salvis.com/blog/tag/debugging/feed/"/>
	<item>
		<title>Using DBMS_DEBUG in SQL Developer</title>
		<link>https://www.salvis.com/blog/2019/04/08/using-dbms_debug-in-sql-developer/</link>
					<comments>https://www.salvis.com/blog/2019/04/08/using-dbms_debug-in-sql-developer/#comments</comments>
		
		<dc:creator><![CDATA[Philipp Salvisberg]]></dc:creator>
		<pubDate>Sun, 07 Apr 2019 22:28:25 +0000</pubDate>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[PL/SQL]]></category>
		<category><![CDATA[SQL Developer]]></category>
		<guid isPermaLink="false">https://www.salvis.com/blog/?p=9158</guid>

					<description><![CDATA[<p>Do you need to debug PL/SQL units in SQL Developer? You can&#8217;t get it to work because someone refuses to open TCP ports between your database and your client? No problem. You can still configure the good old DBMS_DEBUG in your SQL Developer. I know it is deprecated since Oracle Database 12c.<span class="excerpt-hellip"> […]</span></p>
<p>The post <a href="https://www.salvis.com/blog/2019/04/08/using-dbms_debug-in-sql-developer/">Using DBMS_DEBUG in SQL Developer</a> appeared first on <a href="https://www.salvis.com/blog">Philipp Salvisberg&#039;s Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Do you need to debug PL/SQL units in SQL Developer? You can&#8217;t get it to work because someone refuses to open TCP ports between your database and your client? No problem. You can still configure the good old <code>DBMS_DEBUG</code> in your SQL Developer. I know it is deprecated since Oracle Database 12c. It is still available in Oracle Database 19c, and when the alternative is to use no debugger at all, then I don&#8217;t hesitate too much to use deprecated features.</p>



<p>Special thanks to Jeff Smith for showing me this hidden jewel.</p>



<h2 class="wp-block-heading">SQL Developer 20.2 and newer</h2>



<p>SQL Developer 20.2 has a new setting &#8220;use DBMS_DEBUG&#8221;</p>



<figure class="wp-block-image"><a href="https://www.salvis.com/blog/wp-content/uploads/2019/04/debug_preferences.png"><img fetchpriority="high" decoding="async" width="700" height="500" src="https://www.salvis.com/blog/wp-content/uploads/2019/04/debug_preferences.png" alt="" class="wp-image-9979" srcset="https://www.salvis.com/blog/wp-content/uploads/2019/04/debug_preferences.png 700w, https://www.salvis.com/blog/wp-content/uploads/2019/04/debug_preferences-300x214.png 300w, https://www.salvis.com/blog/wp-content/uploads/2019/04/debug_preferences-204x146.png 204w, https://www.salvis.com/blog/wp-content/uploads/2019/04/debug_preferences-50x36.png 50w, https://www.salvis.com/blog/wp-content/uploads/2019/04/debug_preferences-105x75.png 105w, https://www.salvis.com/blog/wp-content/uploads/2019/04/debug_preferences-1x1.png 1w" sizes="(max-width:767px) 480px, 700px" /></a></figure>



<p>Now, you can switch the debugger without restarting SQL Developer.</p>



<h2 class="wp-block-heading">SQL Developer 20.1 and older</h2>



<h3 class="wp-block-heading">Step 1 &#8211; Find the Configuration Folder <code>ide.system.dir</code></h3>



<p>Start the SQL Developer (should work for 4.0.x and newer). Open the <code>About</code> dialog. Click on the <code>Properties</code>&nbsp;tab. Search for <code>ide.system.dir</code>.</p>



<figure class="wp-block-image"><a href="https://www.salvis.com/blog/wp-content/uploads/2019/04/about.png"><img decoding="async" width="610" height="410" src="https://www.salvis.com/blog/wp-content/uploads/2019/04/about.png" alt="" class="wp-image-9166" srcset="https://www.salvis.com/blog/wp-content/uploads/2019/04/about.png 610w, https://www.salvis.com/blog/wp-content/uploads/2019/04/about-300x202.png 300w, https://www.salvis.com/blog/wp-content/uploads/2019/04/about-217x146.png 217w, https://www.salvis.com/blog/wp-content/uploads/2019/04/about-50x34.png 50w, https://www.salvis.com/blog/wp-content/uploads/2019/04/about-112x75.png 112w" sizes="(max-width:767px) 480px, 610px" /></a></figure>



<p>On my MacBook, the folder is named /Users/phs/.sqldeveloper/system18.4.0.376.1900. SQL Developer stores configuration data in this directory. It has a lot of subdirectories. Each deals with a certain subset of functionality.</p>



<h3 class="wp-block-heading">Step 2 &#8211; Close SQL Developer</h3>



<p>This is a very important step. We are going to change a configuration file. SQL Developer reads this file on startup and writes it on shutdown. Hence changing the configuration file while SQL Developer is running will have no effect at all.</p>



<h3 class="wp-block-heading">Step 3 &#8211; Change <code>ide.properties</code></h3>



<p>Add the following line to the <code>./o.sqldeveloper/ide.properties</code> file in the <code>ide.system.dir</code> folder:</p>



<div class="wp-block-kevinbatdorf-code-block-pro" data-code-block-pro-font-family="Code-Pro-JetBrains-Mono" style="font-size:.875rem;font-family:Code-Pro-JetBrains-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)"><span style="display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#1E1E1E"><svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5"></circle><circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5"></circle><circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5"></circle></g></svg></span><span role="button" tabindex="0" style="color:#D4D4D4;display:none" aria-label="Copy" class="code-block-pro-copy-button"><pre class="code-block-pro-copy-button-pre" aria-hidden="true"><textarea class="code-block-pro-copy-button-textarea" tabindex="-1" aria-hidden="true" readonly>DatabaseDebuggerDisableJDWP=true</textarea></pre><svg xmlns="http://www.w3.org/2000/svg" style="width:24px;height:24px" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2"><path class="with-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"></path><path class="without-check" stroke-linecap="round" stroke-linejoin="round" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"></path></svg></span><pre class="shiki dark-plus" style="background-color: #1E1E1E" tabindex="0"><code><span class="line"><span style="color: #D4D4D4">DatabaseDebuggerDisableJDWP=</span><span style="color: #569CD6">true</span></span></code></pre></div>



<p>That&#8217;s it. Next time you start SQL Developer <code>DBMS_DEBUG</code> will be used instead of <code>DBMS_DEBUG_JDWP</code>.</p>



<h2 class="wp-block-heading">Use the Debugger</h2>



<p>Start the SQL Developer, connect to a schema, open a PL/SQL unit, compile the code with debug, set a breakpoint and select <code>Debug...</code>&nbsp;from the context menu to start debugging.</p>



<figure class="wp-block-image"><a href="https://www.salvis.com/blog/wp-content/uploads/2019/04/dbms_debug.png"><img decoding="async" width="679" height="480" src="https://www.salvis.com/blog/wp-content/uploads/2019/04/dbms_debug.png" alt="" class="wp-image-9167" srcset="https://www.salvis.com/blog/wp-content/uploads/2019/04/dbms_debug.png 679w, https://www.salvis.com/blog/wp-content/uploads/2019/04/dbms_debug-300x212.png 300w, https://www.salvis.com/blog/wp-content/uploads/2019/04/dbms_debug-207x146.png 207w, https://www.salvis.com/blog/wp-content/uploads/2019/04/dbms_debug-50x35.png 50w, https://www.salvis.com/blog/wp-content/uploads/2019/04/dbms_debug-106x75.png 106w" sizes="(max-width:767px) 480px, 679px" /></a></figure>



<p>In the debugging pane you see that <code>DBMS_DEBUG</code> is used. Therefore debugging works without using a TCP port.</p>



<h2 class="wp-block-heading">Conclusion</h2>



<p>I prefer the <code>DBMS_DEBUG_JDWP</code> package because of its remote debugging capabilities. See Hatem Mahmoud&#8217;s <a href="https://mahmoudhatem.wordpress.com/2017/04/10/improved-remote-session-debugging-dbms_debug_jdwp/">blog post</a> for more information about that. However, sometimes it is difficult to get the required access rights in a timely manner. And in such situations, it&#8217;s good to know other ways to investigate issues without polluting the code under investigation with additional or temporary logging calls.</p>



<p><em>Updated on 2020-06-26: SQL Developer 20.2 has a new setting &#8220;use DBMS_DEBUG&#8221;, <del>see screenshot below</del>. Now, you can switch the debugger without restarting SQL Developer.</em></p>



<p><em>Updated on 2021-07-22: I&#8217;ve moved the content of the previous update into a dedication section at the top of this blog post. Thank you, Martin Bach for this suggestion via <a href="https://twitter.com/MartinDBA/status/1418125079251193858">Twitter</a>.</em></p>
<p>The post <a href="https://www.salvis.com/blog/2019/04/08/using-dbms_debug-in-sql-developer/">Using DBMS_DEBUG in SQL Developer</a> appeared first on <a href="https://www.salvis.com/blog">Philipp Salvisberg&#039;s Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.salvis.com/blog/2019/04/08/using-dbms_debug-in-sql-developer/feed/</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
			</item>
	</channel>
</rss>
