raldred/cucumber_textmate

Is there a way to use debugger?

Closed this issue · 3 comments

Hey there

When I place a debugger call (ruby-debug) within one of my Cucumber step files and run it through the console, then I can debug.

But when I run it through the TextMate bundle (Cmd-R), it doesn't stop at the debugger statement, but prints some strange stuff into the output HTML like:

/Users/josh/Documents/Work/Sientia/iq/features/step_definitions/contact_steps.rb:19 @contact = Contact.first *** Unknown command: "Feature: Edit contact". Try "help". *** Unknown command: " In order to change a contact's data". Try "help". *** Unknown command: " As a user". Try "help". *** Unknown info command want *** Unknown command: " ". Try "help". *** Unknown command: " Background:". Try "help". *** Unknown command: " Given I am logged in". Try "help". *** Unknown command: " And the following contacts exist:". Try "help". *** Unknown command: " | firstname |". Try "help". *** Unknown command: " | John |". Try "help". *** Unknown command: " And I am at the contacts". Try "help". *** Unknown command: " And I am at the contacts". Try "help". *** Unknown command: " @javascript". Try "help". *** Unknown command: " Scenario: I edit a contact". Try "help". *** Unknown command: " When I select a contact". Try "help". *** Unknown command: " And I click edit preview". Try "help". *** Unknown command: " And I click on its name". Try "help". *** Unknown command: " Then I should see the "Kontakt bearbeiten" form". Try "help". *** Unknown command: " When I change "Vorname" to "Jack"". Try "help". *** Unknown command: " And I click "Bearbeiten"". Try "help". *** Unknown command: " Then I should see item successfully updated message". Try "help". *** Unknown command: " And I should see "Jack Doe"". Try "help".

Is there a way to stop TextMate and open a console with the debugger?

Thank you.

Hi Joshua,
Unfortunately this is not possible within textmate, i've spent a bit
of time trying, unfortunately its a limitation of textmate, the
running window where it shows you the test output does not accept
input and cannot be halted.
The only way to use debugger when running your cukes is to run the in
the terminal.

Sorry that wasnt the answer you were hoping for.
Take care,

Rob

On 22 June 2012 08:09, Joshua Muheim
reply@reply.github.com
wrote:

Hey there

When I place a debugger call (ruby-debug) within one of my Cucumber step files and run it through the console, then I can debug.

But when I run it through the TextMate bundle (Cmd-R), it doesn't stop at the debugger statement, but prints some strange stuff into the output HTML like:

/Users/josh/Documents/Work/Sientia/iq/features/step_definitions/contact_steps.rb:19 @contact = Contact.first *** Unknown command: "Feature: Edit contact". Try "help". *** Unknown command: " In order to change a contact's data". Try "help". *** Unknown command: " As a user". Try "help". *** Unknown info command want *** Unknown command: " ". Try "help". *** Unknown command: " Background:". Try "help". *** Unknown command: " Given I am logged in". Try "help". *** Unknown command: " And the following contacts exist:". Try "help". *** Unknown command: " | firstname |". Try "help". *** Unknown command: " | John |". Try "help". *** Unknown command: " And I am at the contacts". Try "help". *** Unknown command: " And I am at the contacts". Try "help". *** Unknown command: " @javascript". Try "help". *** Unknown command: " Scenario: I edit a contact". Try "help". *** Unknown command: " When I select a contact". Try "help". *** Unknown command: " And I click edit preview". Try "help  ". *** Unknown command: " And I click on its name". Try "help". *** Unknown command: " Then I should see the "Kontakt bearbeiten" form". Try "help". *** Unknown command: " When I change "Vorname" to "Jack"". Try "help". *** Unknown command: " And I click "Bearbeiten"". Try "help". *** Unknown command: " Then I should see item successfully updated message". Try "help". *** Unknown command: " And I should see "Jack Doe"". Try "help".

Is there a way to stop TextMate and open a console with the debugger?

Thank you.


Reply to this email directly or view it on GitHub:
#1

Okay, sad, but good to know. Maybe TextMate2 (if it will ever be released, haha) will fix that.

Have a good time! :)

Good news! When using Spork (and you should not not use Spork IMHO), it actually works! :)

Just add TM_CUCUMBER_OPTS shell variable to TextMate with value --drb, and you will be able to input stuff into Spork's console window! Great!

If you don't know Spork yet, take a lookt at this RailsCast, it is a truly awesome gem and saves a lot of time.

PS: I actually didn't try it with debugger but with pry-debugger, but I guess it will work with debugger too.