vim-vdebug / vdebug

Multi-language DBGP debugger client for Vim (PHP, Python, Perl, Ruby, etc.)
MIT License
1.3k stars 156 forks source link

F5 does not trigger xdebug #101

Closed B2F closed 11 years ago

B2F commented 11 years ago

I have installed xdebug with pecl and added its apth to my /etc/php.ini (fedora). When I type F5 in a php file after putting a breakpoint, it trigger a keyword search but I don't know what is the biding, Vdebug is my only vim plugin.

qstrahl commented 11 years ago

What happens if you do <C-v><F5> in insert mode?

B2F commented 11 years ago

Well, I don't really understand the shortcut you pasted, but ctrl+F5 in insert mode does not work either (same unidentified search function).

joonty commented 11 years ago

@B2F in vim speak, <C-v> means ctrl+v. So, <C-v><F5> means ctrl+v followed by F5.

If that doesn't work, then can you try running:

:python debugger.run()

That will let us know whether it's a plugin integration issue or a keymapping issue.

Thanks

B2F commented 11 years ago

Just tried

:python debugger.run() 

It is indeed a key mapping issue. Any clue how to solve it ?

Thanks a lot !

B2F commented 11 years ago

It is very odd because when I type :map I got:

v  ["          *@:<C-U>exe "normal! gv"|call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW")<CR>                                               
n  ["          *@:call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW")<CR>
v  []          *@m':<C-U>exe "normal! gv"|call search('^\s*endf*\%[unction]\>', "bW")<CR>
n  []          *@m':call search('^\s*endf*\%[unction]\>', "bW")<CR>
v  [[          *@m':<C-U>exe "normal! gv"|call search('^\s*fu\%[nction]\>', "bW")<CR>
n  [[          *@m':call search('^\s*fu\%[nction]\>', "bW")<CR>
v  ]"          *@:<C-U>exe "normal! gv"|call search('^\(\s*".*\n\)\@<!\(\s*"\)', "W")<CR>
n  ]"          *@:call search('^\(\s*".*\n\)\@<!\(\s*"\)', "W")<CR>
v  ][          *@m':<C-U>exe "normal! gv"|call search('^\s*endf*\%[unction]\>', "W")<CR>
n  ][          *@m':call search('^\s*endf*\%[unction]\>', "W")<CR>
v  ]]          *@m':<C-U>exe "normal! gv"|call search('^\s*fu\%[nction]\>', "W")<CR>
n  ]]          *@m':call search('^\s*fu\%[nction]\>', "W")<CR>
v  \e          * :python debugger.handle_visual_eval()<CR>
n  gx            <Plug>NetrwBrowseX
n  <Plug>NetrwBrowseX * :call netrw#NetrwBrowseX(expand("<cWORD>"),0)<CR>
   <F10>       * :python debugger.set_breakpoint()<CR>
   <F5>        * :python debugger.run()<CR>

This should work, especially because F10 successfully put the breakpoint. Other than this problem, F2 and F3 shortcuts aren't working either - F6 to F9 are working.

joonty commented 11 years ago

How about mapping to something other than function keys? E.g. <Ctrl-d>.

Thanks

B2F commented 11 years ago

In my vimrc file, I put

"map <Ctrl-d> python debugger.run()<CR>"

But it still doens't work. Is it the right way to do it ?

By the way, thanks for the help ! I got it working on first try on a kubuntu setup at work (3 months ago) and your plugin is a very usefull tool. I am trying it on my own fedora kde machine but still no luck.

joonty commented 11 years ago

@B2F try this:

noremap <C-s> :python debugger.run()<CR>

That binds it to <Ctrl-S>, as map expects the key first followed by the command.

B2F commented 11 years ago

Got it working perfectly now, thanks again ! Here is my ./vimrc related config:

noremap <C-d> :python debugger.run()<CR>
noremap <C-e> :python debugger.step_over()<CR>
noremap <C-f> :python debugger.step_into()<CR>
noremap <C-r> :python debugger.step_out()<CR>