Search code examples
netbeanspuppet

How do I debug puppet beaker tests using netbeans?


I am trying to understand why some of the puppet code do not work as expected. I run the puppet beaker test using "rake beaker" command. I am failing to understand how can I tell netbeans to run this command after I set the break points in the sources. I tried to set the project configuration with the appropriate parameters from following command line which "rake beaker" invokes.

/usr/local/rvm/rubies/ruby-1.9.3-p545/bin/ruby -I
/usr/local/rvm/gems/ruby-1.9.3-p545/gems/rspec-support-3.1.0/lib:
/usr/local/rvm/gems/ruby-1.9.3-p545/gems/rspec-core-3.1.4/lib 
/usr/local/rvm/gems/ruby-1.9.3-p545/gems/rspec-core-3.1.4/exe/rspec spec/acceptance --color

But the debugger simply starts and ends?

Any idea, how can I debug a rake task?

Update:

As per this I can start the rake beaker task using the ruby-debug-ide, however it does not break at the break points I have set. As per the blog I believe I have break points set in the files, which will run using ruby-debug-ide.

By the way I am running Netbeans 8.0.1 on CentOS 6.4


Solution

  • One way I found out is to

    • Create a Netbeans ruby project
    • Set the breakpoints wherever needed.
    • Open the rspec binary file in Netbeans editor window.
    • Debug rspec file, by pressing Ctrl-Shift-F5
    • Provide the parameters in the debug dialog as shown in picture below
    • And you are done enter image description here