It is my first time to edit python code in vim equipped with python-mode plugin. After setting breakpoints, I use "\ r" command to run it.Then it keep still after printing '[pymode]code running...'.I try some ways but still can not quit debug.It just have no response no matter what I do.
Asked
Active
Viewed 2,623 times
2 Answers
4
According official Debugger commands (from here):
[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

George Petrov
- 2,729
- 1
- 13
- 20
-
Ok, got it. I just think that the python-mode plugin can act as the debugger and can complete it without extra help. – lhao0301 Jan 28 '16 at 07:13
-
Except that he's asking about how to control the debugger from a vim plugin called [python-mode](https://github.com/python-mode/python-mode) which allows you to set breakpoints (
b) and run your code from vim ( – user3183018 Aug 18 '17 at 12:01r) but, not how to control the debugger (where I'm stuck too). -
Yeah.. the debugger gets stuck in my vim too. From what I understand there is no way to send a sigint to VIM. – alpha_989 Nov 18 '17 at 23:17
0
Use :!python3 %, instead of using :PymodeRun or the default keybinding <leader>r
. That way you run the code in the shell and can break out of it and use the debugger as expected.

alpha_989
- 4,882
- 2
- 37
- 48