Git Product home page Git Product logo

Comments (3)

HookyQR avatar HookyQR commented on August 25, 2024

Hey @clxy. Do you have any break points or watches set? I've copied your set up, but can't duplicate the error.

from vscode-ruby.

clxy avatar clxy commented on August 25, 2024

No break points or watches.
But I tried add break points before and after 'it' block, Rspec just skiped without any message!

I tried again, This time I stepped into rspec core.
I got error like this:(only when step in)

Cannot evaluate self
NoMethodError: undefined method `[]' for nil:NilClass
  D:/Ruby/Ruby21/lib/ruby/gems/2.1.0/gems/rspec-core-3.5.3/lib/rspec/core/example.rb:77:in `description'
  D:/Ruby/Ruby21/lib/ruby/gems/2.1.0/gems/rspec-core-3.5.3/lib/rspec/core/example.rb:218:in `inspect'
  D:/Ruby/Ruby21/lib/ruby/gems/2.1.0/gems/ruby-debug-ide-0.6.1.beta2/lib/ruby-debug-ide/commands/variables.rb:132:in `execute'
  D:/Ruby/Ruby21/lib/ruby/gems/2.1.0/gems/ruby-debug-ide-0.6.1.beta2/lib/ruby-debug-ide/ide_processor.rb:41:in `block (2 levels) in process_commands'
  D:/Ruby/Ruby21/lib/ruby/gems/2.1.0/gems/ruby-debug-ide-0.6.1.beta2/lib/ruby-debug-ide/ide_processor.rb:34:in `each'
  D:/Ruby/Ruby21/lib/ruby/gems/2.1.0/gems/ruby-debug-ide-0.6.1.beta2/lib/ruby-debug-ide/ide_processor.rb:34:in `block in process_commands'
  D:/Ruby/Ruby21/lib/ruby/gems/2.1.0/gems/ruby-debug-ide-0.6.1.beta2/lib/ruby-debug-ide/ide_processor.rb:33:in `catch'
  D:/Ruby/Ruby21/lib/ruby/gems/2.1.0/gems/ruby-debug-ide-0.6.1.beta2/lib/ruby-debug-ide/ide_processor.rb:33:in `process_commands'
  D:/Ruby/Ruby21/lib/ruby/gems/2.1.0/gems/ruby-debug-ide-0.6.1.beta2/lib/ruby-debug-ide/event_processor.rb:58:in `line_event'
  D:/Ruby/Ruby21/lib/ruby/gems/2.1.0/gems/ruby-debug-ide-0.6.1.beta2/lib/ruby-debug-ide/event_processor.rb:34:in `at_line'
  D:/Ruby/Ruby21/lib/ruby/gems/2.1.0/gems/debase-0.2.1/lib/debase/context.rb:43:in `at_line'
  D:/Ruby/Ruby21/lib/ruby/gems/2.1.0/gems/rspec-core-3.5.3/lib/rspec/core/example.rb:187:in `initialize'
  D:/Ruby/Ruby21/lib/ruby/gems/2.1.0/gems/rspec-core-3.5.3/lib/rspec/core/example_group.rb:148:in `new'
  D:/Ruby/Ruby21/lib/ruby/gems/2.1.0/gems/rspec-core-3.5.3/lib/rspec/core/example_group.rb:148:in `block in define_example_method'
  d:/projects/RubyLib/spec/utils_rspec.rb:47:in `block (2 levels) in <top (required)>'
  D:/Ruby/Ruby21/lib/ruby/gems/2.1.0/gems/rspec-core-3.5.3/lib/rspec/core/example_group.rb:385:in `module_exec'
  D:/Ruby/Ruby21/lib/ruby/gems/2.1.0/gems/rspec-core-3.5.3/lib/rspec/core/example_group.rb:385:in `subclass'
  D:/Ruby/Ruby21/lib/ruby/gems/2.1.0/gems/rspec-core-3.5.3/lib/rspec/core/example_group.rb:258:in `block in define_example_group_method'
  d:/projects/RubyLib/spec/utils_rspec.rb:35:in `block in <top (required)>'
  D:/Ruby/Ruby21/lib/ruby/gems/2.1.0/gems/rspec-core-3.5.3/lib/rspec/core/example_group.rb:385:in `module_exec'
  D:/Ruby/Ruby21/lib/ruby/gems/2.1.0/gems/rspec-core-3.5.3/lib/rspec/core/example_group.rb:385:in `subclass'
  D:/Ruby/Ruby21/lib/ruby/gems/2.1.0/gems/rspec-core-3.5.3/lib/rspec/core/example_group.rb:258:in `block in define_example_group_method'
  D:/Ruby/Ruby21/lib/ruby/gems/2.1.0/gems/rspec-core-3.5.3/lib/rspec/core/dsl.rb:43:in `block in expose_example_group_alias'
  D:/Ruby/Ruby21/lib/ruby/gems/2.1.0/gems/rspec-core-3.5.3/lib/rspec/core/dsl.rb:84:in `block (2 levels) in expose_example_group_alias_globally'
  d:/projects/RubyLib/spec/utils_rspec.rb:7:in `<top (required)>'
  D:/Ruby/Ruby21/lib/ruby/gems/2.1.0/gems/ruby-debug-ide-0.6.1.beta2/lib/ruby-debug-ide.rb:88:in `debug_load'
  D:/Ruby/Ruby21/lib/ruby/gems/2.1.0/gems/ruby-debug-ide-0.6.1.beta2/lib/ruby-debug-ide.rb:88:in `debug_program'
  D:/Ruby/Ruby21/lib/ruby/gems/2.1.0/gems/ruby-debug-ide-0.6.1.beta2/bin/rdebug-ide:130:in `<top (required)>'
  D:/Ruby/Ruby21/bin/rdebug-ide:23:in `load'
  D:/Ruby/Ruby21/bin/rdebug-ide:23:in `<main>'

Thank you for answering my question.

from vscode-ruby.

clxy avatar clxy commented on August 25, 2024

OK. I solved it!
My fault is setting wrong value to program.
Program must be rspec path.

...
    {
      "name": "RSpec - all",
      "type": "Ruby",
      "request": "launch",
      "cwd": "${workspaceRoot}",
      "program": "D:/Ruby/Ruby21/bin/rspec",
      "args": [
        "--pattern",
        "${workspaceRoot}/spec/**/*_rspec.rb"
      ]
    },
...

from vscode-ruby.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.