2016-01-26 79 views
4

這是我第一次在配有python-mode插件的vim中編輯python代碼。設置好斷點後,我用「\ r」命令來運行它,然後在打印'[pymode]代碼運行...'後仍然保持不變。'我嘗試了一些方法,但仍然不能退出調試。我做的事。 (從here如何在vim中停止調試python

+0

Go Vim!

回答

2

根據官方的調試命令:

[usage:] dbg command [options] 
- quit :: exit the debugger 
- run  :: continue execution until a breakpoint is reached or the program ends 
     default shortcut: \r 
- stop :: exit the debugger 
- over :: step over next function call 
     default shortcut: \o 
- watch :: execute watch functions 
     default shortcut: \w 
- up  :: go up the stack 
     default shortcut: \u 
- here :: continue execution until the cursor (tmp breakpoint) 
     default shortcut: \h 
- down :: go down the stack 
     default shortcut: \d 
- exit :: exit the debugger 
- eval :: eval some code 
- break :: set a breakpoint 
     default shortcut: \b 
- into :: step into next function call 
     default shortcut: \i 
- out  :: step out of current function call 
     default shortcut: \t 
+0

好吧,明白了。我只是認爲python-mode插件可以充當調試器,並且可以在沒有額外幫助的情況下完成它。 – luohao

+0

除了他在問如何從名爲[python-mode](https://github.com/python-mode/python-mode)的vim插件控制調試器,該插件允許您設置斷點( b)並運行你的代碼來自vim( r),但不是如何控制調試器(我也被卡住了)。 – user3183018

+0

是的,調試器也卡在我的vim中。根據我的理解,無法發送sigim給VIM。 –

0

用途:python3%,而不是使用:PymodeRun或默認鍵綁定<leader>r。這樣你可以在shell中運行代碼,並且可以按照預期使用調試器。