How can I debug a single ruby ββscript in netbeans?
All of this is in a Windows XP box:
Netbeans managed to take over an existing rails project and allowed me to debug just fine, but there are several processing scripts in my project that handle non-MVC aspects. The rails project is just a queuing system for executing these scripts.
I tried to create netbeans projects using existing sources, but not for a variety of reasons.
First, since I have multiple scripts in one place, netbeans complains that I cannot add the source directory to the project because it already belongs to another project. If I put the script in my own, empty directory and try to add that directory, netbeans stalls when I try to build the project and I have to end the process from the task manager.
If I create a new project for it, delete the main main.rb file and replace it with the script I want to debug, the debug session won't start - netbeans complains that it can't find the program entry point.
It seems to me that if I can debug rails apps as easily as netbeans does, then running a single standalone script would be trivial. What am I missing?
UPDATE: Loading script and executing "Debug / Debug file" is not possible. The option is always greyed out, even for the hello world.
source to share
Right click on the project, select Properties, select Run and change the Main Script to script.
You can also debug a single file in a Rails project by opening the file, then click Debug in the menu bar, then Debug "filename .rb". Or just press Ctrl-Shift-F5 in the file that opens.
source to share