2016-01-26 76 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中运行代码,并且可以按照预期使用调试器。