Setting LD_LIBRARY_PATH in NetBeans Debugger

Currently in the process of taking legacy C++ code into C# with .NET. The legacy code was given to us in a VM with NetBeans powering the project. It currently requires starting the code externally through a terminal, and then attaching the debugger in NetBeans to the running process. Looking into it, the code was missing some LD_LIBRARY_PATH definitions that were set when the external script was run to start the application. Adding these paths into the local debugger would allow NetBeans to debug the application without needing to attach to an already running process.

To set the paths, go to Run > Set Project Configuration > Customize. Go to Run and then click the “…” next to Environment. Add an environment variable named “LD_LIBRARY_PATH” and the path syntax should look like:


notice the “:”s separating each path.

After adding the page should look like:


Rebuild the project and debug!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.