2015-09-25 70 views
1

問題:撬遠程不會觸發軌道4

升級的另一個分支軌道4,5和努力工作是最後一次Pry-Remote with Pow on Rails 4溶液之後。我仍然對新的Rails 4和Pry調試器感到困難。

什麼是我運行:

rvm 1.26.11 (latest) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/] 
ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin14] 
Rails 4.2.4 
Pry version 0.10.2 on Ruby 2.2.3 

    # Debugging 
    gem 'pry' 
    gem 'pry-byebug' 
    gem 'pry-stack_explorer' 
    gem 'pry-rails' 
    gem 'pry-remote' 
    gem 'byebug' 

pry (0.10.2) 
    coderay (~> 1.1.0) 
    method_source (~> 0.8.1) 
    slop (~> 3.4) 
pry-byebug (3.2.0) 
    byebug (~> 5.0) 
    pry (~> 0.10) 
pry-rails (0.3.4) 
    pry (>= 0.9.10) 
pry-remote (0.1.8) 
    pry (~> 0.9) 
    slop (~> 3.0) 
pry-stack_explorer (0.4.9.2) 
    binding_of_caller (>= 0.7) 
    pry (>= 0.9.11) 

的Mac OS X 10.10.5(14F27)

從戰俘

Full Gemfile and Gemfile.lock

症狀

最新版本:

將binding.remote_pry放入代碼中,代碼停止但無法進入調試器。調試器在我鍵入pry-remote後保持「加載」狀態。

第一個pry-remote:調試器沒有準備好。

二撬遠程:無回答

第三撬遠程:保持負荷而不會輸出

第四撬遠程:輸出當CTRL + C

enter image description here

EDIT 1 :

因此,按照建議的帖子(https://github.com/Mon-Ouie/pry-remote/issues/8)。

我已經做了,並嘗試了以下內容:與

  • 創建.prv文件:

    Pry.config.correct_indent =假

    Pry.config.auto_indent =假

  • 在main.rb中添加了「require'pry-remote'」「

  • 未運行獨角獸或Nginx的,所以沒必要對那些

  • 更新Gemfile文件更新到gem "pry-remote", :require => "pry-remote"

因此,所有這些事情做好,還是沒有什麼區別。

編輯2:

隨着阿列克謝幸的幫助下,我已經感動了一步。現在他進入調試器,但我不能使用nextstep

enter image description here

編輯3:

創建撬Byebug問題:https://github.com/deivid-rodriguez/pry-byebug/issues/78

編輯4: 拆分這篇文章爲Pry Remote/ByeBug next goes into Teardown,因爲我覺得這個問題是更多地涉及ByeBug然後是Pry-remote。

+0

你可以試試在清單這個答案:http://stackoverflow.com/a/32671475/273444 –

+0

@AlexeyShein請檢查我的編輯從你的回答1個 – Vinozio

回答

0

嘗試pry-byebugversion 1.3.3。看起來pry-byebug作者對他的項目失去了興趣,所以你可能需要降級到一個更老的但更穩定的版本。我會做以下幾點:

# remove pry from Gemfile, it will be explicitly loaded by dependency of pry-byebug 
# gem 'pry'  
gem 'pry-byebug', '=1.3.3' 
gem 'pry-stack_explorer' 
gem 'pry-rails' 
gem 'pry-remote' 
# remove also `byebug`, it may give too high version of byebug than needed by pry-byebug 
# gem 'byebug' 

現在運行bundle install。之後,嘗試乾淨地啓動pow,即重新啓動/終止所有的springpow進程。

$ spring stop # graceful spring stop 
$ ps ax | grep '[s]pring' | awk '{ print $1 }' | xargs kill -9 # force spring to quit 
$ touch ~/.pow/restart.txt # restart pow 
+0

謝謝!現在我可以進入調試器,但我似乎無法使用下一步。對此有何建議? :)請在原帖中注意我的編輯2。 – Vinozio

+0

@Vinozio對不起,我沒有想法。嘗試在pry-byebug中創建問題Â\ _(ツ)_ /¯ –

+0

用pry-byebug創建問題! – Vinozio