From 9873b730c658b1211eaa18e1bbb2af1b1b39624c Mon Sep 17 00:00:00 2001 From: "Ryu, Han-seok" Date: Mon, 8 Sep 2014 01:13:05 +0900 Subject: [PATCH 01/16] trace expression --- build.sh | 0 plugin/python/.start_vdebug.py.un~ | Bin 0 -> 7701 bytes plugin/python/start_vdebug.py | 21 +++++++-- plugin/python/vdebug/.dbgp.py.un~ | Bin 0 -> 3575 bytes plugin/python/vdebug/.runner.py.swo | 0 plugin/python/vdebug/.runner.py.swp | 0 plugin/python/vdebug/.runner.py.un~ | Bin 0 -> 9683 bytes plugin/python/vdebug/dbgp.py | 18 ++++++-- plugin/python/vdebug/log.py | 2 +- plugin/python/vdebug/opts.py | 2 +- plugin/python/vdebug/runner.py | 52 +++++++++++++++++++-- plugin/python/vdebug/ui/.vimui.py.swp | 0 plugin/python/vdebug/ui/.vimui.py.un~ | Bin 0 -> 15179 bytes plugin/python/vdebug/ui/interface.py | 1 + plugin/python/vdebug/ui/vimui.py | 64 +++++++++++++++++++++++--- plugin/python/vdebug/util.py | 27 +++++++++++ plugin/vdebug.vim | 61 ++++++++++++++++++++---- 17 files changed, 219 insertions(+), 29 deletions(-) mode change 100755 => 100644 build.sh create mode 100644 plugin/python/.start_vdebug.py.un~ create mode 100644 plugin/python/vdebug/.dbgp.py.un~ create mode 100644 plugin/python/vdebug/.runner.py.swo create mode 100644 plugin/python/vdebug/.runner.py.swp create mode 100644 plugin/python/vdebug/.runner.py.un~ create mode 100644 plugin/python/vdebug/ui/.vimui.py.swp create mode 100644 plugin/python/vdebug/ui/.vimui.py.un~ diff --git a/build.sh b/build.sh old mode 100755 new mode 100644 diff --git a/plugin/python/.start_vdebug.py.un~ b/plugin/python/.start_vdebug.py.un~ new file mode 100644 index 0000000000000000000000000000000000000000..d766ccdc400a3a19f7f2c747e8bcf174d46f0117 GIT binary patch literal 7701 zcmeI1zi-n(6vv(Zp#10$pan`R;Of#Ufhq%{OGPDw5MtnmL!caMWX>sNr@d0i zcJpa7kfCtBVBRjzI7Mk@Xz~DQCuxfGFewDBR%2>od9)2jI}Ga+j*_%g8}*AreWb_G z`%R*jLMM?u@W9l@qsIzI%2?~C^?OO-`X8h~aRTh~azbr2|=<$xMtdDSDXF zN~#4UkLXT9PkUmoTB7$<(KD*_R_Q`-ql*E}C7rpZXsJF{Qq1LLt}+|-v(>mrXQEgD`*u<-h>J6%T^LAW0bYn9@FX7Y5N?B-8mCzJ#_JI# z4UzsNMJ#kGp3#qju4e$c5kUmBedtF5pn??7rvxIL5JxyTZgYrhJ3;K{5cz&E!UtR( z><)oake1NH1V40SGU|5Dtyo4B&EVr~JFP zEkL}F<>W%ypS-6Yl2*4QnhQX?PF^r(MAZ6^mds{1+cb!0u3&SA%f1; z-sLuj)>97}itT3k#i?o}f`%+pZ;RAIa0x&=g-!wuUWg$zPtqE&)xLw;Ic?M5!+i=` zdliw+v|ltKb`=H7Zc;7ajJJ|e3?yvfg&5KZTazawTt7$(wpH2~8PFq9LIP3`sTKgl z9F_YCH0_oqTS4ck(nc-pdI>pP4;sDn})s%;Vzwx z9@uDSt^dLKyA!M|ZPZ2)Yq9jldy|FQ#YIXI6U? zZ`^o{plZ3586AnoxWaBbjECBGyGNdI>(- zP^k#lI#UClPG9i;5sBb~i!1Oh6J>b>f6jof&A=}s?}mLDp*if=H%WuN$MMnI(RDj| z`85r#7NDObA}urwRSv~SKwl+EFC8>tYb5(4kQ!80NR{@+U{yfW>-JD`s0eSLhe}XS06)ZZ&=5lbWbU82!kV^Of#nuoezl(Eo`Bwm4TFUZs zfD8Wv5W&pxI)GGt2fd$%F!^(gkJ7UWpqH6arU+2`6^Net(@$?Dm@Rjm`kor9w%;kWvs_&jLHGw{YP#u& zW&f*gPF+`9kA=trdoBAFjo%_s7$E=!RaH|K$}|+h4I_m5>{|X?2r@ldyVP*YW1-CaHJ_ui|n zs=k^HzPgfME`E)6G)Aq>yWhO>*UcY_+duzwXXVdhuRgr@;M?!dJ^K6MFN4RQMN#}g z6h+6BBgHrw7Q-~JH+1V!oDm}(L834>DcX4Qd1HaC%Ten`wnBDPnf$WpFcNPP{R@#> zu@c0C1~#7D`$BNU(LXQY{)dpjD&9a&6vqj=oAy+zmE~F4YSqVSzt=c_=2M}^Q+6U5 zA<65e66hIC_{u@=OQ9DDz4%2yJE%J&nj?;z+M;m&5Unle%)~VJvVN-Cc~|wbyee$9 z%g#q?E6cmZRbUVSx==Xe6{R#di zrFYONQ7sV_ML-e^Tj}(X21sDLSl2?BCy;it9sp7cKE(puS;b|8Xg)xKF?bC?0$X$* z5iny8tY>*F0CY6tr3irEi3cuLp&4OW)X&c7ffpQ*=1oZLvd zn>U8ZCEI|pcXTTqHHXEhY+k49#s`o%W>a|EsxuskIf@%=Isdeq=~9^u(qd9Jb$^pG z>nCsJ!%4YOj?(s^-e~A>z)&Er&psfqtoSl=^dGE=I`Av7rr(`-PSwY6B3(hZ#C~8J zYZce+Su_I^78nwiSl0rm@f#@P)gge?I`NnRq}9*P=#j6@dL-vfNqd+j4D?B-UyRdwLt?mgW_e6rx;ppL>Ixl>>A`#C zg6ao`5a2ud@LaU;cUR->Ec|nG2@?ML&9s|cSZ}IMv99V3CH3|B24SQ7$+@@FCZsKb zp-Xy# z9KG%Z=a~R8fOGWWxoE*HRf8$#G)Cxohqr?>vr@X7OkDK&pcu#*-TBW!ZlCLNZd81} zm`S&jB?SGjT)@7Dvc%C4Gkqfjz=JM8^Txt{32;AMkGnr^xTM3GO$MIGC8+n2A7>>n zqZWJ$n4NH$z2|gBX0l^PZdp%ZYc_8WQk9KWO%HbTHnU*JE4eO7dRRUV^r!>B0(z@6 z^khe!y^`Jv$x&wL<)r~g*W)_A5w7(Tpe*VI_cLnol>^|(8GyDc0(`l`HxHm}tICQG zd0EkpNvFh`y%jJP%LpGrSe5uJfNRa=>LMc7qlPPU`^k&YLEpm6vx-wv`tGxDJ=X8G-NC+yLo+{u_A;Ap^4p375|L1x3ILVq_r@qZoH)D@ILo@4q&F^{?;NKb#!zdHav|isw(%*Veu- z6pE9DqCHA??I@f@Ly@8>S@6;gJ--W)8m(~UJ=Va~#?`k3hgbOX zVf0Pa-vrMwltj_yLlRd;QClcq5qP{~7tf6l|70pfQrpWmMo5(AKshWwcIG4}4S?dR9V|C{ zV!Kk5Rf=Ba`b9%2fl1gjBP2}P!4aOjP)aT2DFFCE8o(n8aHUcmoLQ_^r)#q%6G4e; zpEWpQB)W%K=g?6LdCLEx>)Z}quTFo2wci>ZK@#3^);W08LY@M6AK89K)o)-4a}p(I ztYqNSt6bp3)1|%Sd3syeOO^SWf2lSb%yEw~bE#erYRi!c5cz%V(Fn}}eY()A3dy&G z34EMp0%@U_s18`eBSxZgq1RGMeuqH!NgBHJ&`Vey*5C+|@XoN#gT-8 zlxlE2iH9=uzS}sICIhLz9IP&n4va~8eqnUt-2AC9#7;5pGOv@UeH9f^@Fn#7@l&Be z&=P(7zt!xe>thqKvrnF;z=mB>=8jv!o!x+*h2y z0|_w13LqZAu~xy+>zKVc#5xEd@}5u}IMqb9GIjxI)!qVjYJUKC%LYe8NVFAS!3_l0 z)vr@zWzI)#wO*aB&sSg%N&3e02a;?aile8R$W}H*?%}5o zdz45ySeafZb#ql(>K*Lu>+aK35PdcBeH?={yAQ?DRZV0oo1*)(?XPew56jDl?ofg* zB5q@#{+K^p)-X(m?Xm_9#OyZ|hgCI^t!y1DJjz4HEy7w(U`-9h!$W6IoEiwm;($zd z8zO`?}$8Xc;mP+PxooMAc zAPb#vhq7hu>id2CH|9S(WT?|KAJ;LUgatV7wDhr~L$4X?zuDC3otj*b#s(7|^Qbiz zAdBvEd2dTGSq>AJ>{m>-bN()v4#bn)c9`f%Pgp|$GI3(rK)4ucX(q#AtVw8<%XZzC z5tAI_L;UNuH!%ap1?D7fVB)2V5mY3Zfy1Tb(lb51gWE^6BPpBD9iZt@qG=NwQ?w~3 z+VG^|2(4WY8up|&+_a=-gyH{cP=P6n(j^V)%vaTtt&BBk%vY1UG+#M}`Tm$@zJ~?o z7SrvG7&kNu$x7le&qcSkWU|p`GJbRBIvhQQ2MtG+G}Z3LjW(I79bw4=CL6~FXQot1 zc8N7<%v7UnC;HSVyDnzh5xU|1*Uzeek+YlrGGi`HC7c|B1J( zwpP&{%~u2)ts9%8ED{%?@Pq5eO52+~azMWy1+hr`;FqyIY!hpRrpuH~BtqH{o%^ U;U(war&8N#3?q^9m0!R75BUsf0RR91 literal 0 HcmV?d00001 diff --git a/plugin/python/vdebug/ui/interface.py b/plugin/python/vdebug/ui/interface.py index 69927e86..a69f9233 100644 --- a/plugin/python/vdebug/ui/interface.py +++ b/plugin/python/vdebug/ui/interface.py @@ -1,6 +1,7 @@ class Ui(): """Abstract for the UI, used by the debugger """ + tracewin = None watchwin = None stackwin = None statuswin = None diff --git a/plugin/python/vdebug/ui/vimui.py b/plugin/python/vdebug/ui/vimui.py index 2be0e1bb..47bf932b 100644 --- a/plugin/python/vdebug/ui/vimui.py +++ b/plugin/python/vdebug/ui/vimui.py @@ -48,7 +48,10 @@ def open(self): srcwin_name = self.__get_srcwin_name() - self.watchwin = WatchWindow(self,'vertical belowright new') + self.tracewin = TraceWindow(self,'vertical belowright new') + self.tracewin.create() + + self.watchwin = WatchWindow(self,'belowright new') self.watchwin.create() self.stackwin = StackWindow(self,'belowright new') @@ -58,8 +61,10 @@ def open(self): self.statuswin.create() self.statuswin.set_status("loading") - self.watchwin.set_height(20) - self.statuswin.set_height(5) + # self.tracewin.set_height(3) + self.watchwin.set_height(40) + # self.stackwin.set_height(3) + self.statuswin.set_height(3) logwin = LogWindow(self,'rightbelow 6new') vdebug.log.Log.set_logger(\ @@ -172,6 +177,8 @@ def close(self): if self.empty_buf_num: vim.command('bw' + self.empty_buf_num) + if self.tracewin: + self.tracewin.destroy() if self.watchwin: self.watchwin.destroy() if self.stackwin: @@ -179,9 +186,11 @@ def close(self): if self.statuswin: self.statuswin.destroy() - self.watchwin = None - self.stackwin = None + self.tracewin = None + self.watchwin = None + self.stackwin = None self.statuswin = None + vim.command('set bexpr=IPythonBalloonExpr()') def __get_srcwin_name(self): @@ -211,6 +220,7 @@ class SourceWindow(vdebug.ui.interface.Window): file = None pointer_sign_id = '6145' breakpoint_sign_id = '6146' + prevline = 0 def __init__(self,ui,winno): self.winno = str(winno) @@ -247,11 +257,22 @@ def clear_signs(self): def place_pointer(self,line): vdebug.log.Log("Placing pointer sign on line "+str(line),\ vdebug.log.Logger.INFO) - self.remove_pointer() + + vim.command('sign undefine current') + vim.command('sign define current text=-> texthl=DbgCurrentSign linehl=DbgCurrentLine') + vim.command('sign place '+self.pointer_sign_id+\ ' name=current line='+str(line)+\ ' file='+self.file) + overmargin = abs( self.prevline - int( vim.eval("line('.')") ) ) > 20 + if overmargin: + vim.command('exe "normal zz"') + self.prevline = int(vim.eval("line('.')")) + if int(vim.eval("line('.')")) > 15: + vim.command('exe "normal 10\"') + vim.command('redraw') + def remove_pointer(self): vim.command('sign unplace %s' % self.pointer_sign_id) @@ -260,6 +281,7 @@ class Window(vdebug.ui.interface.Window): open_cmd = "new" creation_count = 0 + context_sav = None def __init__(self,ui,open_cmd): self.buffer = None self.ui = ui @@ -361,9 +383,19 @@ def command(self, cmd): vim.command(str(winnr) + 'wincmd w') vim.command(cmd) + def accept_value(self,value): + self.write(value) + def accept_renderer(self,renderer): self.write(renderer.render()) + def redisplay(self): + if self.context_sav: + self.write(self.context_sav.render()) + else: + self.write('') + + class BreakpointWindow(Window): name = "DebuggerBreakpoints" is_visible = False @@ -434,6 +466,26 @@ def on_create(self): def write(self, msg, return_focus = True): Window.write(self, msg, after="normal gg") +class TraceWindow(Window): + name = "TraceWindow" + + reserve_trace_code = None + last_context_rendered = None + def on_create(self): + self.command('inoremap '+\ + ':python debugger.handle_return_keypress()') + self.command('nnoremap '+\ + ':python debugger.handle_return_keypress()') + self.command('nnoremap <2-LeftMouse> '+\ + ':python debugger.handle_double_click()') + self.command('setlocal syntax=debugger_watch') + if self.creation_count == 1: + cmd = 'silent! au BufWinLeave %s :silent! bdelete %s' %(self.name,self.name) + vim.command('%s | python debugger.runner.ui.watchwin.is_open = False' % cmd) + + def write(self, msg, return_focus = True): + Window.write(self, msg, after="normal gg") + class WatchWindow(Window): name = "DebuggerWatch" diff --git a/plugin/python/vdebug/util.py b/plugin/python/vdebug/util.py index 729463d7..1b33ff51 100644 --- a/plugin/python/vdebug/util.py +++ b/plugin/python/vdebug/util.py @@ -200,10 +200,37 @@ class InputStream: Used to check for keyboard interrupts.""" + def __init__(self,pydbgp=None): + self.pydbgp = pydbgp + def probe(self): try: vim.eval("getchar(0)") time.sleep(0.1) + + if self.pydbgp: + + import subprocess + import os + + try: + import win32gui + h = win32gui.GetForegroundWindow() + except: + h = None + + fname = vim.current.buffer.name + pydbgp = self.pydbgp + + _autocmd = 'python -S ' + self.pydbgp + ' -d localhost:9000 ' + fname + pid = subprocess.Popen((_autocmd)) + + time.sleep(0.1) + + if h is not None: + win32gui.SetForegroundWindow(h) + + except: # vim.error raise UserInterrupt() diff --git a/plugin/vdebug.vim b/plugin/vdebug.vim index c1adea1a..97392b1a 100644 --- a/plugin/vdebug.vim +++ b/plugin/vdebug.vim @@ -9,7 +9,7 @@ " Perl, NodeJS) " Maintainer: Jon Cairns " Version: 1.4.1 -" Inspired by the Xdebug plugin, which was originally written by +" Inspired by the Xdebug plugin, which was originally written by " Seung Woo Shin sayclub.com> and extended by many " others. " Usage: Use :help Vdebug for information on how to configure and use @@ -44,13 +44,21 @@ else endif " Nice characters get screwed up on windows -if has('win32') || has('win64') - let g:vdebug_force_ascii = 1 -elseif has('multi_byte') == 0 - let g:vdebug_force_ascii = 1 +if !exists('g:vimrc_vdebug_force_ascii') + if has('win32') || has('win64') + let g:vdebug_force_ascii = 1 + elseif has('multi_byte') == 0 + let g:vdebug_force_ascii = 1 + else + let g:vdebug_force_ascii = 0 + end else - let g:vdebug_force_ascii = 0 -end + if g:vimrc_vdebug_force_ascii == 1 + let g:vdebug_force_ascii = 1 + else + let g:vdebug_force_ascii = 0 + endif +endif if !exists("g:vdebug_options") let g:vdebug_options = {} @@ -105,10 +113,28 @@ if g:vdebug_force_ascii == 1 let g:vdebug_options_defaults["marker_default"] = '*' let g:vdebug_options_defaults["marker_closed_tree"] = '+' let g:vdebug_options_defaults["marker_open_tree"] = '-' +else + let g:vdebug_options_defaults["marker_default"] = '♪ ' + let g:vdebug_options_defaults["marker_closed_tree"] = '▶ ' + let g:vdebug_options_defaults["marker_open_tree"] = '▽ ' endif " Create the top dog -python debugger = DebuggerInterface() +if exists("g:vdebug_pydbgp_default") + let g:pydbgp_configured = 1 +else + let g:pydbgp_configured = 0 +endif +python << EOF +import vim +configured = vim.eval("g:pydbgp_configured") +if configured is '1': + pydbgp = vim.eval("g:vdebug_pydbgp_default") +else: + pydbgp = None + +debugger = DebuggerInterface(pydbgp) +EOF " Commands command! -nargs=? -complete=customlist,s:BreakpointTypes Breakpoint python debugger.set_breakpoint() @@ -116,6 +142,7 @@ command! VdebugStart python debugger.run() command! -nargs=? BreakpointRemove python debugger.remove_breakpoint() command! BreakpointWindow python debugger.toggle_breakpoint_window() command! -nargs=? VdebugEval python debugger.handle_eval() +command! -nargs=? VdebugTrace python debugger.handle_trace() command! -nargs=+ -complete=customlist,s:OptionNames VdebugOpt python debugger.handle_opt() " Signs and highlighted lines for breakpoints, etc. @@ -205,6 +232,24 @@ function! Vdebug_edit(filename) endtry endfunction +function! Vdebug_balloon() +python << EOF +import vdebug.ui.vimui +interest = vim.eval("v:beval_text") +try: + var_eval = debugger.runner.api.eval(interest) + rend = vdebug.ui.vimui.ContextGetResponseRenderer(var_eval) + rendred = rend.render() + var_eval = str(rendred) +except: + var_eval = "(cannot evaluate)" + +vim.command('let l:var = "' + var_eval + '"') + +EOF + return l:var +endfunction + silent doautocmd User VdebugPost call Vdebug_load_options(g:vdebug_options) call Vdebug_load_keymaps(g:vdebug_keymap) From 4af6c7043ce90952a3df683877e45d5315ca8a11 Mon Sep 17 00:00:00 2001 From: "Ryu, Han-seok" Date: Mon, 8 Sep 2014 01:15:40 +0900 Subject: [PATCH 02/16] trace --- plugin/python/vdebug/tags | 444 +++++++++++++++++++++++++++++++++++ plugin/python/vdebug/ui/tags | 130 ++++++++++ 2 files changed, 574 insertions(+) create mode 100644 plugin/python/vdebug/tags create mode 100644 plugin/python/vdebug/ui/tags diff --git a/plugin/python/vdebug/tags b/plugin/python/vdebug/tags new file mode 100644 index 00000000..fe511011 --- /dev/null +++ b/plugin/python/vdebug/tags @@ -0,0 +1,444 @@ +!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ +!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ +!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ +!_TAG_PROGRAM_NAME Exuberant Ctags // +!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ +!_TAG_PROGRAM_VERSION 5.8 // +Api .\dbgp.py /^class Api:$/;" c +Breakpoint .\breakpoint.py /^class Breakpoint:$/;" c +BreakpointError .\breakpoint.py /^class BreakpointError(Exception):$/;" c +BreakpointSetResponse .\dbgp.py /^class BreakpointSetResponse(Response):$/;" c +BreakpointWindow .\ui\vimui.py /^class BreakpointWindow(Window):$/;" c +CallBreakpoint .\breakpoint.py /^class CallBreakpoint(Breakpoint):$/;" c +CmdNotImplementedError .\dbgp.py /^class CmdNotImplementedError(Exception):$/;" c +ConditionalBreakpoint .\breakpoint.py /^class ConditionalBreakpoint(LineBreakpoint):$/;" c +Connection .\dbgp.py /^class Connection:$/;" c +ContextGetResponse .\dbgp.py /^class ContextGetResponse(Response):$/;" c +ContextGetResponseRenderer .\ui\vimui.py /^class ContextGetResponseRenderer(ResponseRenderer):$/;" c +ContextNamesResponse .\dbgp.py /^class ContextNamesResponse(Response):$/;" c +ContextProperty .\dbgp.py /^class ContextProperty:$/;" c +CursorEvalEvent .\event.py /^class CursorEvalEvent(Event):$/;" c +DBGPError .\dbgp.py /^class DBGPError(Exception):$/;" c +Dispatcher .\event.py /^class Dispatcher:$/;" c +ET .\dbgp.py /^import xml.etree.ElementTree as ET$/;" i +EvalError .\dbgp.py /^class EvalError(Exception):$/;" c +EvalProperty .\dbgp.py /^class EvalProperty(ContextProperty):$/;" c +EvalResponse .\dbgp.py /^class EvalResponse(ContextGetResponse):$/;" c +Event .\event.py /^class Event:$/;" c +EventError .\event.py /^class EventError(Exception):$/;" c +ExceptionBreakpoint .\breakpoint.py /^class ExceptionBreakpoint(Breakpoint):$/;" c +FeatureGetResponse .\dbgp.py /^class FeatureGetResponse(Response):$/;" c +FileLogger .\log.py /^class FileLogger(Logger):$/;" c +FilePath .\util.py /^class FilePath:$/;" c +FilePathError .\util.py /^class FilePathError(Exception):$/;" c +InputStream .\util.py /^class InputStream:$/;" c +Keymapper .\util.py /^class Keymapper:$/;" c +LineBreakpoint .\breakpoint.py /^class LineBreakpoint(Breakpoint):$/;" c +LocalFilePath .\util.py /^class LocalFilePath(FilePath):$/;" c +Log .\log.py /^class Log:$/;" c +LogError .\log.py /^class LogError(Exception):$/;" c +LogWindow .\ui\vimui.py /^class LogWindow(Window):$/;" c +Logger .\log.py /^class Logger:$/;" c +Options .\opts.py /^class Options:$/;" c +OptionsError .\opts.py /^class OptionsError(Exception):$/;" c +RemoteFilePath .\util.py /^class RemoteFilePath(FilePath):$/;" c +Response .\dbgp.py /^class Response:$/;" c +ResponseError .\dbgp.py /^class ResponseError(Exception):$/;" c +ResponseRenderer .\ui\vimui.py /^class ResponseRenderer:$/;" c +ReturnBreakpoint .\breakpoint.py /^class ReturnBreakpoint(CallBreakpoint):$/;" c +Runner .\runner.py /^class Runner:$/;" c +SourceWindow .\ui\vimui.py /^class SourceWindow(vdebug.ui.interface.Window):$/;" c +StackGetResponse .\dbgp.py /^class StackGetResponse(Response):$/;" c +StackGetResponseRenderer .\ui\vimui.py /^class StackGetResponseRenderer(ResponseRenderer):$/;" c +StackWindow .\ui\vimui.py /^class StackWindow(Window):$/;" c +StackWindowLineSelectEvent .\event.py /^class StackWindowLineSelectEvent(Event):$/;" c +StatusResponse .\dbgp.py /^class StatusResponse(Response):$/;" c +StatusWindow .\ui\vimui.py /^class StatusWindow(Window):$/;" c +Store .\breakpoint.py /^class Store:$/;" c +TYPES .\log.py /^ TYPES = ("ERROR","Info","Debug")$/;" v class:Logger +TemporaryLineBreakpoint .\breakpoint.py /^class TemporaryLineBreakpoint(LineBreakpoint):$/;" c +TimeoutError .\dbgp.py /^class TimeoutError(Exception):$/;" c +TraceResponse .\dbgp.py /^class TraceResponse(Response):$/;" c +TraceWindow .\ui\vimui.py /^class TraceWindow(Window):$/;" c +Ui .\ui\interface.py /^class Ui():$/;" c +Ui .\ui\vimui.py /^class Ui(vdebug.ui.interface.Ui):$/;" c +UserInterrupt .\util.py /^class UserInterrupt(Exception):$/;" c +VisualEvalEvent .\event.py /^class VisualEvalEvent(Event):$/;" c +WatchBreakpoint .\breakpoint.py /^class WatchBreakpoint(Breakpoint):$/;" c +WatchWindow .\ui\vimui.py /^class WatchWindow(Window):$/;" c +WatchWindowContextChangeEvent .\event.py /^class WatchWindowContextChangeEvent(Event):$/;" c +WatchWindowHideEvent .\event.py /^class WatchWindowHideEvent(Event):$/;" c +WatchWindowPropertyGetEvent .\event.py /^class WatchWindowPropertyGetEvent(Event):$/;" c +Window .\ui\interface.py /^class Window:$/;" c +Window .\ui\vimui.py /^class Window(vdebug.ui.interface.Window):$/;" c +WindowLogger .\log.py /^class WindowLogger(Logger):$/;" c +__add__ .\util.py /^ def __add__(self,other):$/;" m class:FilePath file: +__all__ .\ui\__init__.py /^__all__ = ["interface","vimui"]$/;" v +__create_tabs .\ui\vimui.py /^ def __create_tabs(self):$/;" m class:ContextGetResponseRenderer file: +__del__ .\dbgp.py /^ def __del__(self):$/;" m class:Connection file: +__del__ .\ui\interface.py /^ def __del__(self):$/;" m class:Ui file: +__del__ .\ui\interface.py /^ def __del__(self):$/;" m class:Window file: +__determine_context_id .\event.py /^ def __determine_context_id(self,context_names,context_name):$/;" m class:WatchWindowContextChangeEvent file: +__determine_ns .\dbgp.py /^ def __determine_ns(self):$/;" m class:Response file: +__determine_type .\dbgp.py /^ def __determine_type(self,node):$/;" m class:ContextProperty file: +__determine_value .\dbgp.py /^ def __determine_value(self,node):$/;" m class:ContextProperty file: +__eq__ .\util.py /^ def __eq__(self,other):$/;" m class:FilePath file: +__get_buf_list .\ui\vimui.py /^ def __get_buf_list(self):$/;" m class:Ui file: +__get_marker .\ui\vimui.py /^ def __get_marker(self,property):$/;" m class:ContextGetResponseRenderer file: +__get_srcwin_name .\ui\vimui.py /^ def __get_srcwin_name(self):$/;" m class:Ui file: +__get_srcwinno_by_name .\ui\vimui.py /^ def __get_srcwinno_by_name(self,name):$/;" m class:Ui file: +__get_word_end .\event.py /^ def __get_word_end(self,line,column):$/;" m class:WatchWindowContextChangeEvent file: +__get_word_start .\event.py /^ def __get_word_start(self,line,column):$/;" m class:WatchWindowContextChangeEvent file: +__init__ .\breakpoint.py /^ def __init__(self):$/;" m class:Store +__init__ .\breakpoint.py /^ def __init__(self,ui):$/;" m class:Breakpoint +__init__ .\breakpoint.py /^ def __init__(self,ui,exception):$/;" m class:ExceptionBreakpoint +__init__ .\breakpoint.py /^ def __init__(self,ui,expr):$/;" m class:WatchBreakpoint +__init__ .\breakpoint.py /^ def __init__(self,ui,file,line):$/;" m class:LineBreakpoint +__init__ .\breakpoint.py /^ def __init__(self,ui,file,line,condition):$/;" m class:ConditionalBreakpoint +__init__ .\breakpoint.py /^ def __init__(self,ui,function):$/;" m class:CallBreakpoint +__init__ .\dbgp.py /^ def __init__(self, host = '', port = 9000, timeout = 30, input_stream = None, pydbgp=None):$/;" m class:Connection +__init__ .\dbgp.py /^ def __init__(self,connection):$/;" m class:Api +__init__ .\dbgp.py /^ def __init__(self,node,code,language,parent=None,depth=0):$/;" m class:EvalProperty +__init__ .\dbgp.py /^ def __init__(self,node,parent = None,depth = 0):$/;" m class:ContextProperty +__init__ .\dbgp.py /^ def __init__(self,response,cmd,cmd_args,api):$/;" m class:ContextGetResponse +__init__ .\dbgp.py /^ def __init__(self,response,cmd,cmd_args,api):$/;" m class:EvalResponse +__init__ .\dbgp.py /^ def __init__(self,response,cmd,cmd_args,api):$/;" m class:Response +__init__ .\event.py /^ def __init__(self,runner):$/;" m class:Dispatcher +__init__ .\log.py /^ def __init__(self,debug_level):$/;" m class:Logger +__init__ .\log.py /^ def __init__(self,debug_level,filename):$/;" m class:FileLogger +__init__ .\log.py /^ def __init__(self,debug_level,window):$/;" m class:WindowLogger +__init__ .\log.py /^ def __init__(self,string,level = Logger.INFO):$/;" m class:Log +__init__ .\opts.py /^ def __init__(self,options):$/;" m class:Options +__init__ .\runner.py /^ def __init__(self,pydbgp=None):$/;" m class:Runner +__init__ .\ui\interface.py /^ def __init__(self):$/;" m class:Ui +__init__ .\ui\vimui.py /^ def __init__(self,breakpoints):$/;" m class:Ui +__init__ .\ui\vimui.py /^ def __init__(self,response):$/;" m class:ResponseRenderer +__init__ .\ui\vimui.py /^ def __init__(self,response,title = None,contexts = {},current_context = 0):$/;" m class:ContextGetResponseRenderer +__init__ .\ui\vimui.py /^ def __init__(self,ui,open_cmd):$/;" m class:Window +__init__ .\ui\vimui.py /^ def __init__(self,ui,winno):$/;" m class:SourceWindow +__init__ .\util.py /^ def __init__(self):$/;" m class:Keymapper +__init__ .\util.py /^ def __init__(self,filename):$/;" m class:FilePath +__init__ .\util.py /^ def __init__(self,pydbgp=None):$/;" m class:InputStream +__init_children .\dbgp.py /^ def __init_children(self,node):$/;" m class:ContextProperty file: +__ne__ .\util.py /^ def __ne__(self,other):$/;" m class:FilePath file: +__open .\log.py /^ def __open(self):$/;" m class:FileLogger file: +__parse_error .\dbgp.py /^ def __parse_error(self):$/;" m class:Response file: +__parse_init_msg .\dbgp.py /^ def __parse_init_msg(self,msg):$/;" m class:Api file: +__radd__ .\util.py /^ def __radd__(self,other):$/;" m class:FilePath file: +__recv_body .\dbgp.py /^ def __recv_body(self, to_recv):$/;" m class:Connection file: +__recv_length .\dbgp.py /^ def __recv_length(self):$/;" m class:Connection file: +__recv_null .\dbgp.py /^ def __recv_null(self):$/;" m class:Connection file: +__render_property .\ui\vimui.py /^ def __render_property(self,p,next_p,last = False,indent = 0):$/;" m class:ContextGetResponseRenderer file: +__repr__ .\util.py /^ def __repr__(self):$/;" m class:FilePath file: +__str__ .\breakpoint.py /^ def __str__(self):$/;" m class:Breakpoint file: +__str__ .\dbgp.py /^ def __str__(self):$/;" m class:BreakpointSetResponse file: +__str__ .\dbgp.py /^ def __str__(self):$/;" m class:FeatureGetResponse file: +__str__ .\dbgp.py /^ def __str__(self):$/;" m class:Response file: +__str__ .\dbgp.py /^ def __str__(self):$/;" m class:StatusResponse file: +__str__ .\dbgp.py /^ def __str__(self):$/;" m class:TraceResponse file: +__str__ .\util.py /^ def __str__(self):$/;" m class:FilePath file: +_create_child .\dbgp.py /^ def _create_child(self,node,parent,depth):$/;" m class:ContextProperty +_create_child .\dbgp.py /^ def _create_child(self,node,parent,depth):$/;" m class:EvalProperty +_create_local .\util.py /^ def _create_local(self,f):$/;" m class:FilePath +_create_local .\util.py /^ def _create_local(self,f):$/;" m class:LocalFilePath +_create_remote .\util.py /^ def _create_remote(self,f):$/;" m class:FilePath +_create_remote .\util.py /^ def _create_remote(self,f):$/;" m class:RemoteFilePath +_determine_children .\dbgp.py /^ def _determine_children(self,node):$/;" m class:ContextProperty +_determine_displayname .\dbgp.py /^ def _determine_displayname(self,node):$/;" m class:ContextProperty +_determine_displayname .\dbgp.py /^ def _determine_displayname(self,node):$/;" m class:EvalProperty +_get_enc_node_text .\dbgp.py /^ def _get_enc_node_text(self,node,name,default =$/;" m class:ContextProperty +_get_event_by_position .\event.py /^ def _get_event_by_position(self):$/;" m class:Dispatcher +_reload_keys .\util.py /^ def _reload_keys(self):$/;" m class:Keymapper +_store_old_map .\util.py /^ def _store_old_map(self):$/;" m class:Keymapper +accept_renderer .\ui\vimui.py /^ def accept_renderer(self,renderer):$/;" m class:Window +accept_value .\ui\vimui.py /^ def accept_value(self,value):$/;" m class:Window +add_breakpoint .\breakpoint.py /^ def add_breakpoint(self,breakpoint):$/;" m class:Store +add_breakpoint .\ui\vimui.py /^ def add_breakpoint(self,breakpoint):$/;" f +address .\dbgp.py /^ address = None$/;" v class:Connection +as_local .\util.py /^ def as_local(self,quote = False):$/;" m class:FilePath +as_remote .\util.py /^ def as_remote(self):$/;" m class:FilePath +as_string .\dbgp.py /^ def as_string(self):$/;" m class:Response +as_xml .\dbgp.py /^ def as_xml(self):$/;" m class:Response +base64 .\breakpoint.py /^import base64$/;" i +base64 .\dbgp.py /^import base64$/;" i +breakpoint .\runner.py /^import vdebug.breakpoint$/;" i +breakpoint_list .\dbgp.py /^ def breakpoint_list(self):$/;" m class:Api +breakpoint_remove .\dbgp.py /^ def breakpoint_remove(self,id):$/;" m class:Api +breakpoint_set .\dbgp.py /^ def breakpoint_set(self,cmd_args):$/;" m class:Api +breakpoint_sign_id .\ui\vimui.py /^ breakpoint_sign_id = '6146'$/;" v class:SourceWindow +buffer_empty .\ui\vimui.py /^ def buffer_empty(self):$/;" m class:Window +by_position .\event.py /^ def by_position(self):$/;" m class:Dispatcher +char_regex .\event.py /^ char_regex = {$/;" v class:CursorEvalEvent +child_count .\dbgp.py /^ def child_count(self):$/;" m class:ContextProperty +clean .\ui\interface.py /^ def clean(self):$/;" m class:Window +clean .\ui\vimui.py /^ def clean(self):$/;" m class:Window +clear_breakpoints .\breakpoint.py /^ def clear_breakpoints(self):$/;" m class:Store +clear_signs .\ui\vimui.py /^ def clear_signs(self):$/;" m class:SourceWindow +close .\dbgp.py /^ def close(self):$/;" m class:Connection +close .\runner.py /^ def close(self):$/;" m class:Runner +close .\ui\interface.py /^ def close(self):$/;" m class:Ui +close .\ui\vimui.py /^ def close(self):$/;" m class:Ui +close_connection .\runner.py /^ def close_connection(self,stop = True):$/;" m class:Runner +close_key .\util.py /^ def close_key(self):$/;" m class:Keymapper +command .\ui\vimui.py /^ def command(self, cmd):$/;" m class:Window +command .\ui\vimui.py /^ def command(self,cmd):$/;" m class:Ui +command .\ui\vimui.py /^ def command(self,cmd,silent = True):$/;" m class:SourceWindow +conn .\dbgp.py /^ conn = None$/;" v class:Api +context_get .\dbgp.py /^ def context_get(self,context = 0):$/;" m class:Api +context_names .\dbgp.py /^ def context_names(self):$/;" m class:Api +context_sav .\ui\vimui.py /^ context_sav = None $/;" v class:Window +create .\ui\interface.py /^ def create(self):$/;" m class:Window +create .\ui\vimui.py /^ def create(self):$/;" m class:Window +create_properties .\dbgp.py /^ def create_properties(self,property):$/;" m class:ContextGetResponse +creation_count .\ui\vimui.py /^ creation_count = 0$/;" v class:Window +dbg_id .\breakpoint.py /^ dbg_id = None$/;" v class:Breakpoint +dbgp .\runner.py /^import vdebug.dbgp$/;" i +debug_level .\log.py /^ debug_level = ERROR$/;" v class:Logger +delete .\ui\vimui.py /^ def delete(self,start_line,end_line):$/;" m class:Window +destroy .\ui\interface.py /^ def destroy(self):$/;" m class:Window +destroy .\ui\vimui.py /^ def destroy(self):$/;" m class:Window +detach .\dbgp.py /^ def detach(self):$/;" m class:Api +detach .\runner.py /^ def detach(self):$/;" m class:Runner +error .\ui\vimui.py /^ def error(self,string):$/;" m class:Ui +etree .\dbgp.py /^import xml.etree.ElementTree as ET$/;" i +eval .\dbgp.py /^ def eval(self,code):$/;" m class:Api +eval .\runner.py /^ def eval(self,code):$/;" m class:Runner +eval_under_cursor .\event.py /^ def eval_under_cursor(self):$/;" m class:Dispatcher +exclude .\util.py /^ exclude = ["run","set_breakpoint","eval_visual"]$/;" v class:Keymapper +execute .\event.py /^ def execute(self,runner):$/;" m class:CursorEvalEvent +execute .\event.py /^ def execute(self,runner):$/;" m class:Event +execute .\event.py /^ def execute(self,runner):$/;" m class:StackWindowLineSelectEvent +execute .\event.py /^ def execute(self,runner):$/;" m class:VisualEvalEvent +execute .\event.py /^ def execute(self,runner):$/;" m class:WatchWindowContextChangeEvent +execute .\event.py /^ def execute(self,runner):$/;" m class:WatchWindowHideEvent +execute .\event.py /^ def execute(self,runner):$/;" m class:WatchWindowPropertyGetEvent +feature_get .\dbgp.py /^ def feature_get(self,name):$/;" m class:Api +feature_set .\dbgp.py /^ def feature_set(self,name,value):$/;" m class:Api +file .\ui\vimui.py /^ file = None$/;" v class:SourceWindow +find_breakpoint .\breakpoint.py /^ def find_breakpoint(self,file,line):$/;" m class:Store +focus .\ui\vimui.py /^ def focus(self):$/;" m class:SourceWindow +format .\log.py /^ def format(self,string,level):$/;" m class:Logger +get .\opts.py /^ def get(cls,name,as_type = str):$/;" m class:Options +get_breakpoint_sign_positions .\ui\vimui.py /^ def get_breakpoint_sign_positions(self):$/;" m class:Ui +get_cmd .\breakpoint.py /^ def get_cmd(self):$/;" m class:Breakpoint +get_cmd .\breakpoint.py /^ def get_cmd(self):$/;" m class:CallBreakpoint +get_cmd .\breakpoint.py /^ def get_cmd(self):$/;" m class:ConditionalBreakpoint +get_cmd .\breakpoint.py /^ def get_cmd(self):$/;" m class:ExceptionBreakpoint +get_cmd .\breakpoint.py /^ def get_cmd(self):$/;" m class:LineBreakpoint +get_cmd .\breakpoint.py /^ def get_cmd(self):$/;" m class:TemporaryLineBreakpoint +get_cmd .\breakpoint.py /^ def get_cmd(self):$/;" m class:WatchBreakpoint +get_cmd .\dbgp.py /^ def get_cmd(self):$/;" m class:Response +get_cmd_args .\dbgp.py /^ def get_cmd_args(self):$/;" m class:Response +get_code .\dbgp.py /^ def get_code(self):$/;" m class:EvalResponse +get_context .\dbgp.py /^ def get_context(self):$/;" m class:ContextGetResponse +get_context .\dbgp.py /^ def get_context(self):$/;" m class:EvalResponse +get_context .\runner.py /^ def get_context(self,context_id = 0):$/;" m class:Runner +get_current_file .\ui\vimui.py /^ def get_current_file(self):$/;" m class:Ui +get_current_line .\ui\vimui.py /^ def get_current_line(self):$/;" m class:Ui +get_current_row .\ui\vimui.py /^ def get_current_row(self):$/;" m class:Ui +get_debugger_id .\breakpoint.py /^ def get_debugger_id(self):$/;" m class:Breakpoint +get_file .\breakpoint.py /^ def get_file(self):$/;" m class:LineBreakpoint +get_file .\ui\vimui.py /^ def get_file(self):$/;" m class:SourceWindow +get_id .\breakpoint.py /^ def get_id(self):$/;" m class:Breakpoint +get_id .\dbgp.py /^ def get_id(self):$/;" m class:BreakpointSetResponse +get_line .\breakpoint.py /^ def get_line(self):$/;" m class:LineBreakpoint +get_line .\ui\vimui.py /^ def get_line(self,row):$/;" m class:Ui +get_sorted_list .\breakpoint.py /^ def get_sorted_list(self):$/;" m class:Store +get_stack .\dbgp.py /^ def get_stack(self):$/;" m class:StackGetResponse +getwinnr .\ui\vimui.py /^ def getwinnr(self):$/;" m class:Window +id .\breakpoint.py /^ id = 11000$/;" v class:Breakpoint +insert .\ui\interface.py /^ def insert(self, msg, position = None):$/;" m class:Window +insert .\ui\vimui.py /^ def insert(self, msg, lineno = None, overwrite = False, allowEmpty = False):$/;" m class:Window +inst .\opts.py /^ def inst(cls):$/;" m class:Options +instance .\opts.py /^ instance = None$/;" v class:Options +interface .\ui\vimui.py /^import vdebug.ui.interface$/;" i +is_alive .\runner.py /^ def is_alive(self):$/;" m class:Runner +is_modified .\ui\vimui.py /^ def is_modified(self):$/;" m class:Ui +is_open .\ui\interface.py /^ is_open = False$/;" v class:Window +is_supported .\dbgp.py /^ def is_supported(self):$/;" m class:FeatureGetResponse +is_uninitialized .\dbgp.py /^ def is_uninitialized(self):$/;" m class:ContextProperty +is_visible .\ui\vimui.py /^ is_visible = False$/;" v class:BreakpointWindow +is_win .\util.py /^ is_win = False$/;" v class:FilePath +isconnected .\dbgp.py /^ def isconnected(self):$/;" m class:Connection +isconned .\dbgp.py /^ isconned = 0$/;" v class:Connection +isset .\opts.py /^ def isset(cls,name):$/;" m class:Options +kill .\runner.py /^ def kill(self):$/;" m class:Runner +link_api .\breakpoint.py /^ def link_api(self,api):$/;" m class:Store +listen .\dbgp.py /^ def listen(self, serv, timeout):$/;" m class:Connection +listen .\runner.py /^ def listen(self,server,port,timeout):$/;" m class:Runner +log .\breakpoint.py /^import vdebug.log$/;" i +log .\dbgp.py /^import vdebug.log$/;" i +log .\event.py /^import vdebug.log$/;" i +log .\log.py /^ def log(cls, string, level = Logger.INFO):$/;" m class:Log +log .\log.py /^ def log(self, string, level):$/;" m class:FileLogger +log .\log.py /^ def log(self, string, level):$/;" m class:Logger +log .\log.py /^ def log(self, string, level):$/;" m class:WindowLogger +log .\runner.py /^import vdebug.log$/;" i +log .\ui\interface.py /^ def log(self):$/;" m class:Ui +log .\ui\vimui.py /^import vdebug.log$/;" i +log .\util.py /^import vdebug.log$/;" i +loggers .\log.py /^ loggers = {}$/;" v class:Log +logwin .\ui\interface.py /^ logwin = None$/;" v class:Ui +map .\util.py /^ def map(self):$/;" m class:Keymapper +mark_as_last_child .\dbgp.py /^ def mark_as_last_child(self):$/;" m class:ContextProperty +mark_as_stopped .\ui\vimui.py /^ def mark_as_stopped(self):$/;" m class:Ui +name .\ui\interface.py /^ name = "WINDOW"$/;" v class:Window +name .\ui\vimui.py /^ name = "DebuggerBreakpoints"$/;" v class:BreakpointWindow +name .\ui\vimui.py /^ name = "DebuggerLog"$/;" v class:LogWindow +name .\ui\vimui.py /^ name = "DebuggerStack"$/;" v class:StackWindow +name .\ui\vimui.py /^ name = "DebuggerStatus"$/;" v class:StatusWindow +name .\ui\vimui.py /^ name = "DebuggerWatch"$/;" v class:WatchWindow +name .\ui\vimui.py /^ name = "TraceWindow"$/;" v class:TraceWindow +name .\ui\vimui.py /^ name = "WINDOW"$/;" v class:Window +names .\dbgp.py /^ def names(self):$/;" m class:ContextNamesResponse +ns .\dbgp.py /^ ns = '{urn:debugger_protocol_v1}'$/;" v class:ContextProperty +ns .\dbgp.py /^ ns = '{urn:debugger_protocol_v1}'$/;" v class:Response +on_add .\breakpoint.py /^ def on_add(self):$/;" m class:Breakpoint +on_add .\breakpoint.py /^ def on_add(self):$/;" m class:TemporaryLineBreakpoint +on_create .\ui\interface.py /^ def on_create(self):$/;" m class:Window +on_create .\ui\vimui.py /^ def on_create(self):$/;" f +on_create .\ui\vimui.py /^ def on_create(self):$/;" m class:LogWindow +on_create .\ui\vimui.py /^ def on_create(self):$/;" m class:StackWindow +on_create .\ui\vimui.py /^ def on_create(self):$/;" m class:StatusWindow +on_create .\ui\vimui.py /^ def on_create(self):$/;" m class:TraceWindow +on_create .\ui\vimui.py /^ def on_create(self):$/;" m class:WatchWindow +on_remove .\breakpoint.py /^ def on_remove(self):$/;" m class:Breakpoint +on_remove .\breakpoint.py /^ def on_remove(self):$/;" m class:TemporaryLineBreakpoint +open .\dbgp.py /^ def open(self):$/;" m class:Connection +open .\runner.py /^ def open(self):$/;" m class:Runner +open .\ui\interface.py /^ def open(self):$/;" m class:Ui +open .\ui\vimui.py /^ def open(self):$/;" m class:Ui +open_cmd .\ui\vimui.py /^ open_cmd = "new"$/;" v class:Window +opts .\event.py /^import vdebug.opts$/;" i +opts .\runner.py /^import vdebug.opts$/;" i +opts .\ui\vimui.py /^import vdebug.opts$/;" i +opts .\util.py /^import vdebug.opts$/;" i +os .\log.py /^import os$/;" i +os .\runner.py /^ import os$/;" i +os .\util.py /^ import os$/;" i +os .\util.py /^import os$/;" i +overwrite .\opts.py /^ def overwrite(cls,name,value):$/;" m class:Options +parse .\breakpoint.py /^ def parse(self,ui,args):$/;" m class:Breakpoint +place_breakpoint .\ui\vimui.py /^ def place_breakpoint(self,sign_id,file,line):$/;" m class:Ui +place_pointer .\ui\vimui.py /^ def place_pointer(self,line):$/;" m class:SourceWindow +pointer_sign_id .\ui\vimui.py /^ pointer_sign_id = '6145'$/;" v class:SourceWindow +prev_trace_code_value .\runner.py /^ prev_trace_code_value = ''$/;" v class:Runner +prevline .\ui\vimui.py /^ prevline = 0$/;" v class:SourceWindow +probe .\util.py /^ def probe(self):$/;" m class:InputStream +property_get .\dbgp.py /^ def property_get(self,name):$/;" m class:Api +re .\event.py /^import re$/;" i +re .\util.py /^import re$/;" i +recv_msg .\dbgp.py /^ def recv_msg(self):$/;" m class:Connection +redisplay .\ui\vimui.py /^ def redisplay(self):$/;" m class:Window +refresh .\runner.py /^ def refresh(self,status):$/;" m class:Runner +register_breakpoint .\ui\vimui.py /^ def register_breakpoint(self,breakpoint):$/;" m class:Ui +remove_breakpoint .\breakpoint.py /^ def remove_breakpoint(self,breakpoint):$/;" m class:Store +remove_breakpoint .\runner.py /^ def remove_breakpoint(self,args):$/;" m class:Runner +remove_breakpoint .\ui\vimui.py /^ def remove_breakpoint(self,breakpoint):$/;" m class:Ui +remove_breakpoint .\ui\vimui.py /^ def remove_breakpoint(self,breakpoint_id):$/;" f +remove_breakpoint_by_id .\breakpoint.py /^ def remove_breakpoint_by_id(self,id):$/;" m class:Store +remove_conn_details .\ui\vimui.py /^ def remove_conn_details(self):$/;" m class:Ui +remove_logger .\log.py /^ def remove_logger(cls, type):$/;" m class:Log +remove_pointer .\ui\vimui.py /^ def remove_pointer(self):$/;" m class:SourceWindow +render .\ui\vimui.py /^ def render(self):$/;" m class:ResponseRenderer +render .\ui\vimui.py /^ def render(self):$/;" m class:StackGetResponseRenderer +render .\ui\vimui.py /^ def render(self,indent = 0):$/;" m class:ContextGetResponseRenderer +run .\dbgp.py /^ def run(self):$/;" m class:Api +run .\runner.py /^ def run(self):$/;" m class:Runner +run_key .\util.py /^ def run_key(self):$/;" m class:Keymapper +run_to_cursor .\runner.py /^ def run_to_cursor(self):$/;" m class:Runner +say .\ui\interface.py /^ def say(self,string):$/;" m class:Ui +say .\ui\vimui.py /^ def say(self,string):$/;" m class:Ui +send_cmd .\dbgp.py /^ def send_cmd(self,cmd,args = '',$/;" m class:Api +send_msg .\dbgp.py /^ def send_msg(self, cmd):$/;" m class:Connection +set .\opts.py /^ def set(cls,options):$/;" m class:Options +set_breakpoint .\runner.py /^ def set_breakpoint(self,args):$/;" m class:Runner +set_conn_details .\ui\vimui.py /^ def set_conn_details(self,addr,port):$/;" m class:Ui +set_debugger_id .\breakpoint.py /^ def set_debugger_id(self,dbg_id):$/;" m class:Breakpoint +set_features .\runner.py /^ def set_features(self):$/;" m class:Runner +set_file .\ui\vimui.py /^ def set_file(self,file):$/;" m class:SourceWindow +set_height .\ui\vimui.py /^ def set_height(self,height):$/;" m class:Window +set_line .\breakpoint.py /^ def set_line(self,line):$/;" m class:LineBreakpoint +set_line .\ui\vimui.py /^ def set_line(self,lineno):$/;" m class:SourceWindow +set_listener_details .\ui\vimui.py /^ def set_listener_details(self,addr,port,idekey):$/;" m class:Ui +set_logger .\log.py /^ def set_logger(cls, logger):$/;" m class:Log +set_source_position .\ui\vimui.py /^ def set_source_position(self,file,lineno):$/;" m class:Ui +set_status .\ui\vimui.py /^ def set_status(self,status):$/;" m class:StatusWindow +shutdown .\log.py /^ def shutdown(cls):$/;" m class:Log +shutdown .\log.py /^ def shutdown(self):$/;" m class:FileLogger +shutdown .\log.py /^ def shutdown(self):$/;" m class:Logger +shutdown .\log.py /^ def shutdown(self):$/;" m class:WindowLogger +sock .\dbgp.py /^ sock = None$/;" v class:Connection +socket .\dbgp.py /^import socket$/;" i +socket .\runner.py /^import socket$/;" i +sourcewin .\ui\interface.py /^ sourcewin = None$/;" v class:Ui +stack_get .\dbgp.py /^ def stack_get(self):$/;" m class:Api +stackwin .\ui\interface.py /^ stackwin = None$/;" v class:Ui +status .\dbgp.py /^ def status(self):$/;" m class:Api +statuswin .\ui\interface.py /^ statuswin = None$/;" v class:Ui +step_into .\dbgp.py /^ def step_into(self):$/;" m class:Api +step_into .\runner.py /^ def step_into(self):$/;" m class:Runner +step_out .\dbgp.py /^ def step_out(self):$/;" m class:Api +step_out .\runner.py /^ def step_out(self):$/;" m class:Runner +step_over .\dbgp.py /^ def step_over(self):$/;" m class:Api +step_over .\runner.py /^ def step_over(self):$/;" m class:Runner +stop .\dbgp.py /^ def stop(self):$/;" m class:Api +subprocess .\util.py /^ import subprocess$/;" i +sys .\log.py /^import sys$/;" i +time .\dbgp.py /^import time$/;" i +time .\log.py /^ def time(self):$/;" m class:Logger +time .\log.py /^import time$/;" i +time .\util.py /^import time$/;" i +toggle_breakpoint_window .\runner.py /^ def toggle_breakpoint_window(self):$/;" m class:Runner +trace .\runner.py /^ def trace(self,code):$/;" m class:Runner +tracewin .\ui\interface.py /^ tracewin = None $/;" v class:Ui +transID .\dbgp.py /^ transID = 0$/;" v class:Api +type .\breakpoint.py /^ type = "call"$/;" v class:CallBreakpoint +type .\breakpoint.py /^ type = "conditional"$/;" v class:ConditionalBreakpoint +type .\breakpoint.py /^ type = "exception"$/;" v class:ExceptionBreakpoint +type .\breakpoint.py /^ type = "line"$/;" v class:LineBreakpoint +type .\breakpoint.py /^ type = "return"$/;" v class:ReturnBreakpoint +type .\breakpoint.py /^ type = "watch"$/;" v class:WatchBreakpoint +type .\breakpoint.py /^ type = None$/;" v class:Breakpoint +type_and_size .\dbgp.py /^ def type_and_size(self):$/;" m class:ContextProperty +ui .\runner.py /^import vdebug.ui.vimui$/;" i +ui .\ui\vimui.py /^import vdebug.ui.interface$/;" i +unlink_api .\breakpoint.py /^ def unlink_api(self):$/;" m class:Store +unmap .\util.py /^ def unmap(self):$/;" m class:Keymapper +update_lines .\breakpoint.py /^ def update_lines(self,lines):$/;" m class:Store +update_stack .\runner.py /^ def update_stack(self):$/;" m class:Runner +urllib .\util.py /^import urllib$/;" i +util .\runner.py /^import vdebug.util$/;" i +util .\ui\vimui.py /^import vdebug.util$/;" i +var_regex .\event.py /^ var_regex = {$/;" v class:CursorEvalEvent +vdebug .\breakpoint.py /^import vdebug.log$/;" i +vdebug .\dbgp.py /^import vdebug.log$/;" i +vdebug .\event.py /^import vdebug.log$/;" i +vdebug .\event.py /^import vdebug.opts$/;" i +vdebug .\runner.py /^import vdebug.breakpoint$/;" i +vdebug .\runner.py /^import vdebug.dbgp$/;" i +vdebug .\runner.py /^import vdebug.log$/;" i +vdebug .\runner.py /^import vdebug.opts$/;" i +vdebug .\runner.py /^import vdebug.ui.vimui$/;" i +vdebug .\runner.py /^import vdebug.util$/;" i +vdebug .\ui\vimui.py /^import vdebug.log$/;" i +vdebug .\ui\vimui.py /^import vdebug.opts$/;" i +vdebug .\ui\vimui.py /^import vdebug.ui.interface$/;" i +vdebug .\ui\vimui.py /^import vdebug.util$/;" i +vdebug .\util.py /^import vdebug.log$/;" i +vdebug .\util.py /^import vdebug.opts$/;" i +vim .\event.py /^import vim$/;" i +vim .\runner.py /^import vim$/;" i +vim .\ui\vimui.py /^import vim$/;" i +vim .\util.py /^import vim$/;" i +vimui .\runner.py /^import vdebug.ui.vimui$/;" i +visual_eval .\event.py /^ def visual_eval(self):$/;" m class:Dispatcher +watchwin .\ui\interface.py /^ watchwin = None$/;" v class:Ui +win32gui .\util.py /^ import win32gui$/;" i +write .\ui\interface.py /^ def write(self, msg):$/;" m class:Window +write .\ui\vimui.py /^ def write(self, msg, return_focus = True):$/;" m class:LogWindow +write .\ui\vimui.py /^ def write(self, msg, return_focus = True):$/;" m class:StackWindow +write .\ui\vimui.py /^ def write(self, msg, return_focus = True):$/;" m class:TraceWindow +write .\ui\vimui.py /^ def write(self, msg, return_focus = True):$/;" m class:WatchWindow +write .\ui\vimui.py /^ def write(self, msg, return_focus = True, after = "normal G"):$/;" m class:Window +xml .\dbgp.py /^import xml.etree.ElementTree as ET$/;" i diff --git a/plugin/python/vdebug/ui/tags b/plugin/python/vdebug/ui/tags new file mode 100644 index 00000000..97f9585b --- /dev/null +++ b/plugin/python/vdebug/ui/tags @@ -0,0 +1,130 @@ +!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ +!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ +!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ +!_TAG_PROGRAM_NAME Exuberant Ctags // +!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ +!_TAG_PROGRAM_VERSION 5.8 // +BreakpointWindow .\vimui.py /^class BreakpointWindow(Window):$/;" c +ContextGetResponseRenderer .\vimui.py /^class ContextGetResponseRenderer(ResponseRenderer):$/;" c +LogWindow .\vimui.py /^class LogWindow(Window):$/;" c +ResponseRenderer .\vimui.py /^class ResponseRenderer:$/;" c +SourceWindow .\vimui.py /^class SourceWindow(vdebug.ui.interface.Window):$/;" c +StackGetResponseRenderer .\vimui.py /^class StackGetResponseRenderer(ResponseRenderer):$/;" c +StackWindow .\vimui.py /^class StackWindow(Window):$/;" c +StatusWindow .\vimui.py /^class StatusWindow(Window):$/;" c +TraceWindow .\vimui.py /^class TraceWindow(Window):$/;" c +Ui .\interface.py /^class Ui():$/;" c +Ui .\vimui.py /^class Ui(vdebug.ui.interface.Ui):$/;" c +WatchWindow .\vimui.py /^class WatchWindow(Window):$/;" c +Window .\interface.py /^class Window:$/;" c +Window .\vimui.py /^class Window(vdebug.ui.interface.Window):$/;" c +__all__ .\__init__.py /^__all__ = ["interface","vimui"]$/;" v +__create_tabs .\vimui.py /^ def __create_tabs(self):$/;" m class:ContextGetResponseRenderer file: +__del__ .\interface.py /^ def __del__(self):$/;" m class:Ui file: +__del__ .\interface.py /^ def __del__(self):$/;" m class:Window file: +__get_buf_list .\vimui.py /^ def __get_buf_list(self):$/;" m class:Ui file: +__get_marker .\vimui.py /^ def __get_marker(self,property):$/;" m class:ContextGetResponseRenderer file: +__get_srcwin_name .\vimui.py /^ def __get_srcwin_name(self):$/;" m class:Ui file: +__get_srcwinno_by_name .\vimui.py /^ def __get_srcwinno_by_name(self,name):$/;" m class:Ui file: +__init__ .\interface.py /^ def __init__(self):$/;" m class:Ui +__init__ .\vimui.py /^ def __init__(self,breakpoints):$/;" m class:Ui +__init__ .\vimui.py /^ def __init__(self,response):$/;" m class:ResponseRenderer +__init__ .\vimui.py /^ def __init__(self,response,title = None,contexts = {},current_context = 0):$/;" m class:ContextGetResponseRenderer +__init__ .\vimui.py /^ def __init__(self,ui,open_cmd):$/;" m class:Window +__init__ .\vimui.py /^ def __init__(self,ui,winno):$/;" m class:SourceWindow +__render_property .\vimui.py /^ def __render_property(self,p,next_p,last = False,indent = 0):$/;" m class:ContextGetResponseRenderer file: +accept_renderer .\vimui.py /^ def accept_renderer(self,renderer):$/;" m class:Window +add_breakpoint .\vimui.py /^ def add_breakpoint(self,breakpoint):$/;" f +breakpoint_sign_id .\vimui.py /^ breakpoint_sign_id = '6146'$/;" v class:SourceWindow +buffer_empty .\vimui.py /^ def buffer_empty(self):$/;" m class:Window +clean .\interface.py /^ def clean(self):$/;" m class:Window +clean .\vimui.py /^ def clean(self):$/;" m class:Window +clear_signs .\vimui.py /^ def clear_signs(self):$/;" m class:SourceWindow +close .\interface.py /^ def close(self):$/;" m class:Ui +close .\vimui.py /^ def close(self):$/;" m class:Ui +command .\vimui.py /^ def command(self, cmd):$/;" m class:Window +command .\vimui.py /^ def command(self,cmd):$/;" m class:Ui +command .\vimui.py /^ def command(self,cmd,silent = True):$/;" m class:SourceWindow +create .\interface.py /^ def create(self):$/;" m class:Window +create .\vimui.py /^ def create(self):$/;" m class:Window +creation_count .\vimui.py /^ creation_count = 0$/;" v class:Window +delete .\vimui.py /^ def delete(self,start_line,end_line):$/;" m class:Window +destroy .\interface.py /^ def destroy(self):$/;" m class:Window +destroy .\vimui.py /^ def destroy(self):$/;" m class:Window +error .\vimui.py /^ def error(self,string):$/;" m class:Ui +file .\vimui.py /^ file = None$/;" v class:SourceWindow +focus .\vimui.py /^ def focus(self):$/;" m class:SourceWindow +get_breakpoint_sign_positions .\vimui.py /^ def get_breakpoint_sign_positions(self):$/;" m class:Ui +get_current_file .\vimui.py /^ def get_current_file(self):$/;" m class:Ui +get_current_line .\vimui.py /^ def get_current_line(self):$/;" m class:Ui +get_current_row .\vimui.py /^ def get_current_row(self):$/;" m class:Ui +get_file .\vimui.py /^ def get_file(self):$/;" m class:SourceWindow +get_line .\vimui.py /^ def get_line(self,row):$/;" m class:Ui +getwinnr .\vimui.py /^ def getwinnr(self):$/;" m class:Window +insert .\interface.py /^ def insert(self, msg, position = None):$/;" m class:Window +insert .\vimui.py /^ def insert(self, msg, lineno = None, overwrite = False, allowEmpty = False):$/;" m class:Window +interface .\vimui.py /^import vdebug.ui.interface$/;" i +is_modified .\vimui.py /^ def is_modified(self):$/;" m class:Ui +is_open .\interface.py /^ is_open = False$/;" v class:Window +is_visible .\vimui.py /^ is_visible = False$/;" v class:BreakpointWindow +log .\interface.py /^ def log(self):$/;" m class:Ui +log .\vimui.py /^import vdebug.log$/;" i +logwin .\interface.py /^ logwin = None$/;" v class:Ui +mark_as_stopped .\vimui.py /^ def mark_as_stopped(self):$/;" m class:Ui +name .\interface.py /^ name = "WINDOW"$/;" v class:Window +name .\vimui.py /^ name = "DebuggerBreakpoints"$/;" v class:BreakpointWindow +name .\vimui.py /^ name = "DebuggerLog"$/;" v class:LogWindow +name .\vimui.py /^ name = "DebuggerStack"$/;" v class:StackWindow +name .\vimui.py /^ name = "DebuggerStatus"$/;" v class:StatusWindow +name .\vimui.py /^ name = "DebuggerWatch"$/;" v class:TraceWindow +name .\vimui.py /^ name = "DebuggerWatch"$/;" v class:WatchWindow +name .\vimui.py /^ name = "WINDOW"$/;" v class:Window +on_create .\interface.py /^ def on_create(self):$/;" m class:Window +on_create .\vimui.py /^ def on_create(self):$/;" f +on_create .\vimui.py /^ def on_create(self):$/;" m class:LogWindow +on_create .\vimui.py /^ def on_create(self):$/;" m class:StackWindow +on_create .\vimui.py /^ def on_create(self):$/;" m class:StatusWindow +on_create .\vimui.py /^ def on_create(self):$/;" m class:TraceWindow +on_create .\vimui.py /^ def on_create(self):$/;" m class:WatchWindow +open .\interface.py /^ def open(self):$/;" m class:Ui +open .\vimui.py /^ def open(self):$/;" m class:Ui +open_cmd .\vimui.py /^ open_cmd = "new"$/;" v class:Window +opts .\vimui.py /^import vdebug.opts$/;" i +place_breakpoint .\vimui.py /^ def place_breakpoint(self,sign_id,file,line):$/;" m class:Ui +place_pointer .\vimui.py /^ def place_pointer(self,line):$/;" m class:SourceWindow +pointer_sign_id .\vimui.py /^ pointer_sign_id = '6145'$/;" v class:SourceWindow +prevline .\vimui.py /^ prevline = 0$/;" v class:SourceWindow +register_breakpoint .\vimui.py /^ def register_breakpoint(self,breakpoint):$/;" m class:Ui +remove_breakpoint .\vimui.py /^ def remove_breakpoint(self,breakpoint):$/;" m class:Ui +remove_breakpoint .\vimui.py /^ def remove_breakpoint(self,breakpoint_id):$/;" f +remove_conn_details .\vimui.py /^ def remove_conn_details(self):$/;" m class:Ui +remove_pointer .\vimui.py /^ def remove_pointer(self):$/;" m class:SourceWindow +render .\vimui.py /^ def render(self):$/;" m class:ResponseRenderer +render .\vimui.py /^ def render(self):$/;" m class:StackGetResponseRenderer +render .\vimui.py /^ def render(self,indent = 0):$/;" m class:ContextGetResponseRenderer +say .\interface.py /^ def say(self,string):$/;" m class:Ui +say .\vimui.py /^ def say(self,string):$/;" m class:Ui +set_conn_details .\vimui.py /^ def set_conn_details(self,addr,port):$/;" m class:Ui +set_file .\vimui.py /^ def set_file(self,file):$/;" m class:SourceWindow +set_height .\vimui.py /^ def set_height(self,height):$/;" m class:Window +set_line .\vimui.py /^ def set_line(self,lineno):$/;" m class:SourceWindow +set_listener_details .\vimui.py /^ def set_listener_details(self,addr,port,idekey):$/;" m class:Ui +set_source_position .\vimui.py /^ def set_source_position(self,file,lineno):$/;" m class:Ui +set_status .\vimui.py /^ def set_status(self,status):$/;" m class:StatusWindow +sourcewin .\interface.py /^ sourcewin = None$/;" v class:Ui +stackwin .\interface.py /^ stackwin = None$/;" v class:Ui +statuswin .\interface.py /^ statuswin = None$/;" v class:Ui +ui .\vimui.py /^import vdebug.ui.interface$/;" i +util .\vimui.py /^import vdebug.util$/;" i +vdebug .\vimui.py /^import vdebug.log$/;" i +vdebug .\vimui.py /^import vdebug.opts$/;" i +vdebug .\vimui.py /^import vdebug.ui.interface$/;" i +vdebug .\vimui.py /^import vdebug.util$/;" i +vim .\vimui.py /^import vim$/;" i +watchwin .\interface.py /^ watchwin = None$/;" v class:Ui +write .\interface.py /^ def write(self, msg):$/;" m class:Window +write .\vimui.py /^ def write(self, msg, return_focus = True):$/;" m class:LogWindow +write .\vimui.py /^ def write(self, msg, return_focus = True):$/;" m class:StackWindow +write .\vimui.py /^ def write(self, msg, return_focus = True):$/;" m class:TraceWindow +write .\vimui.py /^ def write(self, msg, return_focus = True):$/;" m class:WatchWindow +write .\vimui.py /^ def write(self, msg, return_focus = True, after = "normal G"):$/;" m class:Window From 054624b8b8a30eb61b35963e44f597efdf21d0ba Mon Sep 17 00:00:00 2001 From: "Ryu, Han-seok" Date: Mon, 8 Sep 2014 01:34:53 +0900 Subject: [PATCH 03/16] 'trace' --- plugin/python/vdebug/tags | 444 ----------------------------------- plugin/python/vdebug/ui/tags | 130 ---------- 2 files changed, 574 deletions(-) delete mode 100644 plugin/python/vdebug/tags delete mode 100644 plugin/python/vdebug/ui/tags diff --git a/plugin/python/vdebug/tags b/plugin/python/vdebug/tags deleted file mode 100644 index fe511011..00000000 --- a/plugin/python/vdebug/tags +++ /dev/null @@ -1,444 +0,0 @@ -!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ -!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ -!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ -!_TAG_PROGRAM_NAME Exuberant Ctags // -!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ -!_TAG_PROGRAM_VERSION 5.8 // -Api .\dbgp.py /^class Api:$/;" c -Breakpoint .\breakpoint.py /^class Breakpoint:$/;" c -BreakpointError .\breakpoint.py /^class BreakpointError(Exception):$/;" c -BreakpointSetResponse .\dbgp.py /^class BreakpointSetResponse(Response):$/;" c -BreakpointWindow .\ui\vimui.py /^class BreakpointWindow(Window):$/;" c -CallBreakpoint .\breakpoint.py /^class CallBreakpoint(Breakpoint):$/;" c -CmdNotImplementedError .\dbgp.py /^class CmdNotImplementedError(Exception):$/;" c -ConditionalBreakpoint .\breakpoint.py /^class ConditionalBreakpoint(LineBreakpoint):$/;" c -Connection .\dbgp.py /^class Connection:$/;" c -ContextGetResponse .\dbgp.py /^class ContextGetResponse(Response):$/;" c -ContextGetResponseRenderer .\ui\vimui.py /^class ContextGetResponseRenderer(ResponseRenderer):$/;" c -ContextNamesResponse .\dbgp.py /^class ContextNamesResponse(Response):$/;" c -ContextProperty .\dbgp.py /^class ContextProperty:$/;" c -CursorEvalEvent .\event.py /^class CursorEvalEvent(Event):$/;" c -DBGPError .\dbgp.py /^class DBGPError(Exception):$/;" c -Dispatcher .\event.py /^class Dispatcher:$/;" c -ET .\dbgp.py /^import xml.etree.ElementTree as ET$/;" i -EvalError .\dbgp.py /^class EvalError(Exception):$/;" c -EvalProperty .\dbgp.py /^class EvalProperty(ContextProperty):$/;" c -EvalResponse .\dbgp.py /^class EvalResponse(ContextGetResponse):$/;" c -Event .\event.py /^class Event:$/;" c -EventError .\event.py /^class EventError(Exception):$/;" c -ExceptionBreakpoint .\breakpoint.py /^class ExceptionBreakpoint(Breakpoint):$/;" c -FeatureGetResponse .\dbgp.py /^class FeatureGetResponse(Response):$/;" c -FileLogger .\log.py /^class FileLogger(Logger):$/;" c -FilePath .\util.py /^class FilePath:$/;" c -FilePathError .\util.py /^class FilePathError(Exception):$/;" c -InputStream .\util.py /^class InputStream:$/;" c -Keymapper .\util.py /^class Keymapper:$/;" c -LineBreakpoint .\breakpoint.py /^class LineBreakpoint(Breakpoint):$/;" c -LocalFilePath .\util.py /^class LocalFilePath(FilePath):$/;" c -Log .\log.py /^class Log:$/;" c -LogError .\log.py /^class LogError(Exception):$/;" c -LogWindow .\ui\vimui.py /^class LogWindow(Window):$/;" c -Logger .\log.py /^class Logger:$/;" c -Options .\opts.py /^class Options:$/;" c -OptionsError .\opts.py /^class OptionsError(Exception):$/;" c -RemoteFilePath .\util.py /^class RemoteFilePath(FilePath):$/;" c -Response .\dbgp.py /^class Response:$/;" c -ResponseError .\dbgp.py /^class ResponseError(Exception):$/;" c -ResponseRenderer .\ui\vimui.py /^class ResponseRenderer:$/;" c -ReturnBreakpoint .\breakpoint.py /^class ReturnBreakpoint(CallBreakpoint):$/;" c -Runner .\runner.py /^class Runner:$/;" c -SourceWindow .\ui\vimui.py /^class SourceWindow(vdebug.ui.interface.Window):$/;" c -StackGetResponse .\dbgp.py /^class StackGetResponse(Response):$/;" c -StackGetResponseRenderer .\ui\vimui.py /^class StackGetResponseRenderer(ResponseRenderer):$/;" c -StackWindow .\ui\vimui.py /^class StackWindow(Window):$/;" c -StackWindowLineSelectEvent .\event.py /^class StackWindowLineSelectEvent(Event):$/;" c -StatusResponse .\dbgp.py /^class StatusResponse(Response):$/;" c -StatusWindow .\ui\vimui.py /^class StatusWindow(Window):$/;" c -Store .\breakpoint.py /^class Store:$/;" c -TYPES .\log.py /^ TYPES = ("ERROR","Info","Debug")$/;" v class:Logger -TemporaryLineBreakpoint .\breakpoint.py /^class TemporaryLineBreakpoint(LineBreakpoint):$/;" c -TimeoutError .\dbgp.py /^class TimeoutError(Exception):$/;" c -TraceResponse .\dbgp.py /^class TraceResponse(Response):$/;" c -TraceWindow .\ui\vimui.py /^class TraceWindow(Window):$/;" c -Ui .\ui\interface.py /^class Ui():$/;" c -Ui .\ui\vimui.py /^class Ui(vdebug.ui.interface.Ui):$/;" c -UserInterrupt .\util.py /^class UserInterrupt(Exception):$/;" c -VisualEvalEvent .\event.py /^class VisualEvalEvent(Event):$/;" c -WatchBreakpoint .\breakpoint.py /^class WatchBreakpoint(Breakpoint):$/;" c -WatchWindow .\ui\vimui.py /^class WatchWindow(Window):$/;" c -WatchWindowContextChangeEvent .\event.py /^class WatchWindowContextChangeEvent(Event):$/;" c -WatchWindowHideEvent .\event.py /^class WatchWindowHideEvent(Event):$/;" c -WatchWindowPropertyGetEvent .\event.py /^class WatchWindowPropertyGetEvent(Event):$/;" c -Window .\ui\interface.py /^class Window:$/;" c -Window .\ui\vimui.py /^class Window(vdebug.ui.interface.Window):$/;" c -WindowLogger .\log.py /^class WindowLogger(Logger):$/;" c -__add__ .\util.py /^ def __add__(self,other):$/;" m class:FilePath file: -__all__ .\ui\__init__.py /^__all__ = ["interface","vimui"]$/;" v -__create_tabs .\ui\vimui.py /^ def __create_tabs(self):$/;" m class:ContextGetResponseRenderer file: -__del__ .\dbgp.py /^ def __del__(self):$/;" m class:Connection file: -__del__ .\ui\interface.py /^ def __del__(self):$/;" m class:Ui file: -__del__ .\ui\interface.py /^ def __del__(self):$/;" m class:Window file: -__determine_context_id .\event.py /^ def __determine_context_id(self,context_names,context_name):$/;" m class:WatchWindowContextChangeEvent file: -__determine_ns .\dbgp.py /^ def __determine_ns(self):$/;" m class:Response file: -__determine_type .\dbgp.py /^ def __determine_type(self,node):$/;" m class:ContextProperty file: -__determine_value .\dbgp.py /^ def __determine_value(self,node):$/;" m class:ContextProperty file: -__eq__ .\util.py /^ def __eq__(self,other):$/;" m class:FilePath file: -__get_buf_list .\ui\vimui.py /^ def __get_buf_list(self):$/;" m class:Ui file: -__get_marker .\ui\vimui.py /^ def __get_marker(self,property):$/;" m class:ContextGetResponseRenderer file: -__get_srcwin_name .\ui\vimui.py /^ def __get_srcwin_name(self):$/;" m class:Ui file: -__get_srcwinno_by_name .\ui\vimui.py /^ def __get_srcwinno_by_name(self,name):$/;" m class:Ui file: -__get_word_end .\event.py /^ def __get_word_end(self,line,column):$/;" m class:WatchWindowContextChangeEvent file: -__get_word_start .\event.py /^ def __get_word_start(self,line,column):$/;" m class:WatchWindowContextChangeEvent file: -__init__ .\breakpoint.py /^ def __init__(self):$/;" m class:Store -__init__ .\breakpoint.py /^ def __init__(self,ui):$/;" m class:Breakpoint -__init__ .\breakpoint.py /^ def __init__(self,ui,exception):$/;" m class:ExceptionBreakpoint -__init__ .\breakpoint.py /^ def __init__(self,ui,expr):$/;" m class:WatchBreakpoint -__init__ .\breakpoint.py /^ def __init__(self,ui,file,line):$/;" m class:LineBreakpoint -__init__ .\breakpoint.py /^ def __init__(self,ui,file,line,condition):$/;" m class:ConditionalBreakpoint -__init__ .\breakpoint.py /^ def __init__(self,ui,function):$/;" m class:CallBreakpoint -__init__ .\dbgp.py /^ def __init__(self, host = '', port = 9000, timeout = 30, input_stream = None, pydbgp=None):$/;" m class:Connection -__init__ .\dbgp.py /^ def __init__(self,connection):$/;" m class:Api -__init__ .\dbgp.py /^ def __init__(self,node,code,language,parent=None,depth=0):$/;" m class:EvalProperty -__init__ .\dbgp.py /^ def __init__(self,node,parent = None,depth = 0):$/;" m class:ContextProperty -__init__ .\dbgp.py /^ def __init__(self,response,cmd,cmd_args,api):$/;" m class:ContextGetResponse -__init__ .\dbgp.py /^ def __init__(self,response,cmd,cmd_args,api):$/;" m class:EvalResponse -__init__ .\dbgp.py /^ def __init__(self,response,cmd,cmd_args,api):$/;" m class:Response -__init__ .\event.py /^ def __init__(self,runner):$/;" m class:Dispatcher -__init__ .\log.py /^ def __init__(self,debug_level):$/;" m class:Logger -__init__ .\log.py /^ def __init__(self,debug_level,filename):$/;" m class:FileLogger -__init__ .\log.py /^ def __init__(self,debug_level,window):$/;" m class:WindowLogger -__init__ .\log.py /^ def __init__(self,string,level = Logger.INFO):$/;" m class:Log -__init__ .\opts.py /^ def __init__(self,options):$/;" m class:Options -__init__ .\runner.py /^ def __init__(self,pydbgp=None):$/;" m class:Runner -__init__ .\ui\interface.py /^ def __init__(self):$/;" m class:Ui -__init__ .\ui\vimui.py /^ def __init__(self,breakpoints):$/;" m class:Ui -__init__ .\ui\vimui.py /^ def __init__(self,response):$/;" m class:ResponseRenderer -__init__ .\ui\vimui.py /^ def __init__(self,response,title = None,contexts = {},current_context = 0):$/;" m class:ContextGetResponseRenderer -__init__ .\ui\vimui.py /^ def __init__(self,ui,open_cmd):$/;" m class:Window -__init__ .\ui\vimui.py /^ def __init__(self,ui,winno):$/;" m class:SourceWindow -__init__ .\util.py /^ def __init__(self):$/;" m class:Keymapper -__init__ .\util.py /^ def __init__(self,filename):$/;" m class:FilePath -__init__ .\util.py /^ def __init__(self,pydbgp=None):$/;" m class:InputStream -__init_children .\dbgp.py /^ def __init_children(self,node):$/;" m class:ContextProperty file: -__ne__ .\util.py /^ def __ne__(self,other):$/;" m class:FilePath file: -__open .\log.py /^ def __open(self):$/;" m class:FileLogger file: -__parse_error .\dbgp.py /^ def __parse_error(self):$/;" m class:Response file: -__parse_init_msg .\dbgp.py /^ def __parse_init_msg(self,msg):$/;" m class:Api file: -__radd__ .\util.py /^ def __radd__(self,other):$/;" m class:FilePath file: -__recv_body .\dbgp.py /^ def __recv_body(self, to_recv):$/;" m class:Connection file: -__recv_length .\dbgp.py /^ def __recv_length(self):$/;" m class:Connection file: -__recv_null .\dbgp.py /^ def __recv_null(self):$/;" m class:Connection file: -__render_property .\ui\vimui.py /^ def __render_property(self,p,next_p,last = False,indent = 0):$/;" m class:ContextGetResponseRenderer file: -__repr__ .\util.py /^ def __repr__(self):$/;" m class:FilePath file: -__str__ .\breakpoint.py /^ def __str__(self):$/;" m class:Breakpoint file: -__str__ .\dbgp.py /^ def __str__(self):$/;" m class:BreakpointSetResponse file: -__str__ .\dbgp.py /^ def __str__(self):$/;" m class:FeatureGetResponse file: -__str__ .\dbgp.py /^ def __str__(self):$/;" m class:Response file: -__str__ .\dbgp.py /^ def __str__(self):$/;" m class:StatusResponse file: -__str__ .\dbgp.py /^ def __str__(self):$/;" m class:TraceResponse file: -__str__ .\util.py /^ def __str__(self):$/;" m class:FilePath file: -_create_child .\dbgp.py /^ def _create_child(self,node,parent,depth):$/;" m class:ContextProperty -_create_child .\dbgp.py /^ def _create_child(self,node,parent,depth):$/;" m class:EvalProperty -_create_local .\util.py /^ def _create_local(self,f):$/;" m class:FilePath -_create_local .\util.py /^ def _create_local(self,f):$/;" m class:LocalFilePath -_create_remote .\util.py /^ def _create_remote(self,f):$/;" m class:FilePath -_create_remote .\util.py /^ def _create_remote(self,f):$/;" m class:RemoteFilePath -_determine_children .\dbgp.py /^ def _determine_children(self,node):$/;" m class:ContextProperty -_determine_displayname .\dbgp.py /^ def _determine_displayname(self,node):$/;" m class:ContextProperty -_determine_displayname .\dbgp.py /^ def _determine_displayname(self,node):$/;" m class:EvalProperty -_get_enc_node_text .\dbgp.py /^ def _get_enc_node_text(self,node,name,default =$/;" m class:ContextProperty -_get_event_by_position .\event.py /^ def _get_event_by_position(self):$/;" m class:Dispatcher -_reload_keys .\util.py /^ def _reload_keys(self):$/;" m class:Keymapper -_store_old_map .\util.py /^ def _store_old_map(self):$/;" m class:Keymapper -accept_renderer .\ui\vimui.py /^ def accept_renderer(self,renderer):$/;" m class:Window -accept_value .\ui\vimui.py /^ def accept_value(self,value):$/;" m class:Window -add_breakpoint .\breakpoint.py /^ def add_breakpoint(self,breakpoint):$/;" m class:Store -add_breakpoint .\ui\vimui.py /^ def add_breakpoint(self,breakpoint):$/;" f -address .\dbgp.py /^ address = None$/;" v class:Connection -as_local .\util.py /^ def as_local(self,quote = False):$/;" m class:FilePath -as_remote .\util.py /^ def as_remote(self):$/;" m class:FilePath -as_string .\dbgp.py /^ def as_string(self):$/;" m class:Response -as_xml .\dbgp.py /^ def as_xml(self):$/;" m class:Response -base64 .\breakpoint.py /^import base64$/;" i -base64 .\dbgp.py /^import base64$/;" i -breakpoint .\runner.py /^import vdebug.breakpoint$/;" i -breakpoint_list .\dbgp.py /^ def breakpoint_list(self):$/;" m class:Api -breakpoint_remove .\dbgp.py /^ def breakpoint_remove(self,id):$/;" m class:Api -breakpoint_set .\dbgp.py /^ def breakpoint_set(self,cmd_args):$/;" m class:Api -breakpoint_sign_id .\ui\vimui.py /^ breakpoint_sign_id = '6146'$/;" v class:SourceWindow -buffer_empty .\ui\vimui.py /^ def buffer_empty(self):$/;" m class:Window -by_position .\event.py /^ def by_position(self):$/;" m class:Dispatcher -char_regex .\event.py /^ char_regex = {$/;" v class:CursorEvalEvent -child_count .\dbgp.py /^ def child_count(self):$/;" m class:ContextProperty -clean .\ui\interface.py /^ def clean(self):$/;" m class:Window -clean .\ui\vimui.py /^ def clean(self):$/;" m class:Window -clear_breakpoints .\breakpoint.py /^ def clear_breakpoints(self):$/;" m class:Store -clear_signs .\ui\vimui.py /^ def clear_signs(self):$/;" m class:SourceWindow -close .\dbgp.py /^ def close(self):$/;" m class:Connection -close .\runner.py /^ def close(self):$/;" m class:Runner -close .\ui\interface.py /^ def close(self):$/;" m class:Ui -close .\ui\vimui.py /^ def close(self):$/;" m class:Ui -close_connection .\runner.py /^ def close_connection(self,stop = True):$/;" m class:Runner -close_key .\util.py /^ def close_key(self):$/;" m class:Keymapper -command .\ui\vimui.py /^ def command(self, cmd):$/;" m class:Window -command .\ui\vimui.py /^ def command(self,cmd):$/;" m class:Ui -command .\ui\vimui.py /^ def command(self,cmd,silent = True):$/;" m class:SourceWindow -conn .\dbgp.py /^ conn = None$/;" v class:Api -context_get .\dbgp.py /^ def context_get(self,context = 0):$/;" m class:Api -context_names .\dbgp.py /^ def context_names(self):$/;" m class:Api -context_sav .\ui\vimui.py /^ context_sav = None $/;" v class:Window -create .\ui\interface.py /^ def create(self):$/;" m class:Window -create .\ui\vimui.py /^ def create(self):$/;" m class:Window -create_properties .\dbgp.py /^ def create_properties(self,property):$/;" m class:ContextGetResponse -creation_count .\ui\vimui.py /^ creation_count = 0$/;" v class:Window -dbg_id .\breakpoint.py /^ dbg_id = None$/;" v class:Breakpoint -dbgp .\runner.py /^import vdebug.dbgp$/;" i -debug_level .\log.py /^ debug_level = ERROR$/;" v class:Logger -delete .\ui\vimui.py /^ def delete(self,start_line,end_line):$/;" m class:Window -destroy .\ui\interface.py /^ def destroy(self):$/;" m class:Window -destroy .\ui\vimui.py /^ def destroy(self):$/;" m class:Window -detach .\dbgp.py /^ def detach(self):$/;" m class:Api -detach .\runner.py /^ def detach(self):$/;" m class:Runner -error .\ui\vimui.py /^ def error(self,string):$/;" m class:Ui -etree .\dbgp.py /^import xml.etree.ElementTree as ET$/;" i -eval .\dbgp.py /^ def eval(self,code):$/;" m class:Api -eval .\runner.py /^ def eval(self,code):$/;" m class:Runner -eval_under_cursor .\event.py /^ def eval_under_cursor(self):$/;" m class:Dispatcher -exclude .\util.py /^ exclude = ["run","set_breakpoint","eval_visual"]$/;" v class:Keymapper -execute .\event.py /^ def execute(self,runner):$/;" m class:CursorEvalEvent -execute .\event.py /^ def execute(self,runner):$/;" m class:Event -execute .\event.py /^ def execute(self,runner):$/;" m class:StackWindowLineSelectEvent -execute .\event.py /^ def execute(self,runner):$/;" m class:VisualEvalEvent -execute .\event.py /^ def execute(self,runner):$/;" m class:WatchWindowContextChangeEvent -execute .\event.py /^ def execute(self,runner):$/;" m class:WatchWindowHideEvent -execute .\event.py /^ def execute(self,runner):$/;" m class:WatchWindowPropertyGetEvent -feature_get .\dbgp.py /^ def feature_get(self,name):$/;" m class:Api -feature_set .\dbgp.py /^ def feature_set(self,name,value):$/;" m class:Api -file .\ui\vimui.py /^ file = None$/;" v class:SourceWindow -find_breakpoint .\breakpoint.py /^ def find_breakpoint(self,file,line):$/;" m class:Store -focus .\ui\vimui.py /^ def focus(self):$/;" m class:SourceWindow -format .\log.py /^ def format(self,string,level):$/;" m class:Logger -get .\opts.py /^ def get(cls,name,as_type = str):$/;" m class:Options -get_breakpoint_sign_positions .\ui\vimui.py /^ def get_breakpoint_sign_positions(self):$/;" m class:Ui -get_cmd .\breakpoint.py /^ def get_cmd(self):$/;" m class:Breakpoint -get_cmd .\breakpoint.py /^ def get_cmd(self):$/;" m class:CallBreakpoint -get_cmd .\breakpoint.py /^ def get_cmd(self):$/;" m class:ConditionalBreakpoint -get_cmd .\breakpoint.py /^ def get_cmd(self):$/;" m class:ExceptionBreakpoint -get_cmd .\breakpoint.py /^ def get_cmd(self):$/;" m class:LineBreakpoint -get_cmd .\breakpoint.py /^ def get_cmd(self):$/;" m class:TemporaryLineBreakpoint -get_cmd .\breakpoint.py /^ def get_cmd(self):$/;" m class:WatchBreakpoint -get_cmd .\dbgp.py /^ def get_cmd(self):$/;" m class:Response -get_cmd_args .\dbgp.py /^ def get_cmd_args(self):$/;" m class:Response -get_code .\dbgp.py /^ def get_code(self):$/;" m class:EvalResponse -get_context .\dbgp.py /^ def get_context(self):$/;" m class:ContextGetResponse -get_context .\dbgp.py /^ def get_context(self):$/;" m class:EvalResponse -get_context .\runner.py /^ def get_context(self,context_id = 0):$/;" m class:Runner -get_current_file .\ui\vimui.py /^ def get_current_file(self):$/;" m class:Ui -get_current_line .\ui\vimui.py /^ def get_current_line(self):$/;" m class:Ui -get_current_row .\ui\vimui.py /^ def get_current_row(self):$/;" m class:Ui -get_debugger_id .\breakpoint.py /^ def get_debugger_id(self):$/;" m class:Breakpoint -get_file .\breakpoint.py /^ def get_file(self):$/;" m class:LineBreakpoint -get_file .\ui\vimui.py /^ def get_file(self):$/;" m class:SourceWindow -get_id .\breakpoint.py /^ def get_id(self):$/;" m class:Breakpoint -get_id .\dbgp.py /^ def get_id(self):$/;" m class:BreakpointSetResponse -get_line .\breakpoint.py /^ def get_line(self):$/;" m class:LineBreakpoint -get_line .\ui\vimui.py /^ def get_line(self,row):$/;" m class:Ui -get_sorted_list .\breakpoint.py /^ def get_sorted_list(self):$/;" m class:Store -get_stack .\dbgp.py /^ def get_stack(self):$/;" m class:StackGetResponse -getwinnr .\ui\vimui.py /^ def getwinnr(self):$/;" m class:Window -id .\breakpoint.py /^ id = 11000$/;" v class:Breakpoint -insert .\ui\interface.py /^ def insert(self, msg, position = None):$/;" m class:Window -insert .\ui\vimui.py /^ def insert(self, msg, lineno = None, overwrite = False, allowEmpty = False):$/;" m class:Window -inst .\opts.py /^ def inst(cls):$/;" m class:Options -instance .\opts.py /^ instance = None$/;" v class:Options -interface .\ui\vimui.py /^import vdebug.ui.interface$/;" i -is_alive .\runner.py /^ def is_alive(self):$/;" m class:Runner -is_modified .\ui\vimui.py /^ def is_modified(self):$/;" m class:Ui -is_open .\ui\interface.py /^ is_open = False$/;" v class:Window -is_supported .\dbgp.py /^ def is_supported(self):$/;" m class:FeatureGetResponse -is_uninitialized .\dbgp.py /^ def is_uninitialized(self):$/;" m class:ContextProperty -is_visible .\ui\vimui.py /^ is_visible = False$/;" v class:BreakpointWindow -is_win .\util.py /^ is_win = False$/;" v class:FilePath -isconnected .\dbgp.py /^ def isconnected(self):$/;" m class:Connection -isconned .\dbgp.py /^ isconned = 0$/;" v class:Connection -isset .\opts.py /^ def isset(cls,name):$/;" m class:Options -kill .\runner.py /^ def kill(self):$/;" m class:Runner -link_api .\breakpoint.py /^ def link_api(self,api):$/;" m class:Store -listen .\dbgp.py /^ def listen(self, serv, timeout):$/;" m class:Connection -listen .\runner.py /^ def listen(self,server,port,timeout):$/;" m class:Runner -log .\breakpoint.py /^import vdebug.log$/;" i -log .\dbgp.py /^import vdebug.log$/;" i -log .\event.py /^import vdebug.log$/;" i -log .\log.py /^ def log(cls, string, level = Logger.INFO):$/;" m class:Log -log .\log.py /^ def log(self, string, level):$/;" m class:FileLogger -log .\log.py /^ def log(self, string, level):$/;" m class:Logger -log .\log.py /^ def log(self, string, level):$/;" m class:WindowLogger -log .\runner.py /^import vdebug.log$/;" i -log .\ui\interface.py /^ def log(self):$/;" m class:Ui -log .\ui\vimui.py /^import vdebug.log$/;" i -log .\util.py /^import vdebug.log$/;" i -loggers .\log.py /^ loggers = {}$/;" v class:Log -logwin .\ui\interface.py /^ logwin = None$/;" v class:Ui -map .\util.py /^ def map(self):$/;" m class:Keymapper -mark_as_last_child .\dbgp.py /^ def mark_as_last_child(self):$/;" m class:ContextProperty -mark_as_stopped .\ui\vimui.py /^ def mark_as_stopped(self):$/;" m class:Ui -name .\ui\interface.py /^ name = "WINDOW"$/;" v class:Window -name .\ui\vimui.py /^ name = "DebuggerBreakpoints"$/;" v class:BreakpointWindow -name .\ui\vimui.py /^ name = "DebuggerLog"$/;" v class:LogWindow -name .\ui\vimui.py /^ name = "DebuggerStack"$/;" v class:StackWindow -name .\ui\vimui.py /^ name = "DebuggerStatus"$/;" v class:StatusWindow -name .\ui\vimui.py /^ name = "DebuggerWatch"$/;" v class:WatchWindow -name .\ui\vimui.py /^ name = "TraceWindow"$/;" v class:TraceWindow -name .\ui\vimui.py /^ name = "WINDOW"$/;" v class:Window -names .\dbgp.py /^ def names(self):$/;" m class:ContextNamesResponse -ns .\dbgp.py /^ ns = '{urn:debugger_protocol_v1}'$/;" v class:ContextProperty -ns .\dbgp.py /^ ns = '{urn:debugger_protocol_v1}'$/;" v class:Response -on_add .\breakpoint.py /^ def on_add(self):$/;" m class:Breakpoint -on_add .\breakpoint.py /^ def on_add(self):$/;" m class:TemporaryLineBreakpoint -on_create .\ui\interface.py /^ def on_create(self):$/;" m class:Window -on_create .\ui\vimui.py /^ def on_create(self):$/;" f -on_create .\ui\vimui.py /^ def on_create(self):$/;" m class:LogWindow -on_create .\ui\vimui.py /^ def on_create(self):$/;" m class:StackWindow -on_create .\ui\vimui.py /^ def on_create(self):$/;" m class:StatusWindow -on_create .\ui\vimui.py /^ def on_create(self):$/;" m class:TraceWindow -on_create .\ui\vimui.py /^ def on_create(self):$/;" m class:WatchWindow -on_remove .\breakpoint.py /^ def on_remove(self):$/;" m class:Breakpoint -on_remove .\breakpoint.py /^ def on_remove(self):$/;" m class:TemporaryLineBreakpoint -open .\dbgp.py /^ def open(self):$/;" m class:Connection -open .\runner.py /^ def open(self):$/;" m class:Runner -open .\ui\interface.py /^ def open(self):$/;" m class:Ui -open .\ui\vimui.py /^ def open(self):$/;" m class:Ui -open_cmd .\ui\vimui.py /^ open_cmd = "new"$/;" v class:Window -opts .\event.py /^import vdebug.opts$/;" i -opts .\runner.py /^import vdebug.opts$/;" i -opts .\ui\vimui.py /^import vdebug.opts$/;" i -opts .\util.py /^import vdebug.opts$/;" i -os .\log.py /^import os$/;" i -os .\runner.py /^ import os$/;" i -os .\util.py /^ import os$/;" i -os .\util.py /^import os$/;" i -overwrite .\opts.py /^ def overwrite(cls,name,value):$/;" m class:Options -parse .\breakpoint.py /^ def parse(self,ui,args):$/;" m class:Breakpoint -place_breakpoint .\ui\vimui.py /^ def place_breakpoint(self,sign_id,file,line):$/;" m class:Ui -place_pointer .\ui\vimui.py /^ def place_pointer(self,line):$/;" m class:SourceWindow -pointer_sign_id .\ui\vimui.py /^ pointer_sign_id = '6145'$/;" v class:SourceWindow -prev_trace_code_value .\runner.py /^ prev_trace_code_value = ''$/;" v class:Runner -prevline .\ui\vimui.py /^ prevline = 0$/;" v class:SourceWindow -probe .\util.py /^ def probe(self):$/;" m class:InputStream -property_get .\dbgp.py /^ def property_get(self,name):$/;" m class:Api -re .\event.py /^import re$/;" i -re .\util.py /^import re$/;" i -recv_msg .\dbgp.py /^ def recv_msg(self):$/;" m class:Connection -redisplay .\ui\vimui.py /^ def redisplay(self):$/;" m class:Window -refresh .\runner.py /^ def refresh(self,status):$/;" m class:Runner -register_breakpoint .\ui\vimui.py /^ def register_breakpoint(self,breakpoint):$/;" m class:Ui -remove_breakpoint .\breakpoint.py /^ def remove_breakpoint(self,breakpoint):$/;" m class:Store -remove_breakpoint .\runner.py /^ def remove_breakpoint(self,args):$/;" m class:Runner -remove_breakpoint .\ui\vimui.py /^ def remove_breakpoint(self,breakpoint):$/;" m class:Ui -remove_breakpoint .\ui\vimui.py /^ def remove_breakpoint(self,breakpoint_id):$/;" f -remove_breakpoint_by_id .\breakpoint.py /^ def remove_breakpoint_by_id(self,id):$/;" m class:Store -remove_conn_details .\ui\vimui.py /^ def remove_conn_details(self):$/;" m class:Ui -remove_logger .\log.py /^ def remove_logger(cls, type):$/;" m class:Log -remove_pointer .\ui\vimui.py /^ def remove_pointer(self):$/;" m class:SourceWindow -render .\ui\vimui.py /^ def render(self):$/;" m class:ResponseRenderer -render .\ui\vimui.py /^ def render(self):$/;" m class:StackGetResponseRenderer -render .\ui\vimui.py /^ def render(self,indent = 0):$/;" m class:ContextGetResponseRenderer -run .\dbgp.py /^ def run(self):$/;" m class:Api -run .\runner.py /^ def run(self):$/;" m class:Runner -run_key .\util.py /^ def run_key(self):$/;" m class:Keymapper -run_to_cursor .\runner.py /^ def run_to_cursor(self):$/;" m class:Runner -say .\ui\interface.py /^ def say(self,string):$/;" m class:Ui -say .\ui\vimui.py /^ def say(self,string):$/;" m class:Ui -send_cmd .\dbgp.py /^ def send_cmd(self,cmd,args = '',$/;" m class:Api -send_msg .\dbgp.py /^ def send_msg(self, cmd):$/;" m class:Connection -set .\opts.py /^ def set(cls,options):$/;" m class:Options -set_breakpoint .\runner.py /^ def set_breakpoint(self,args):$/;" m class:Runner -set_conn_details .\ui\vimui.py /^ def set_conn_details(self,addr,port):$/;" m class:Ui -set_debugger_id .\breakpoint.py /^ def set_debugger_id(self,dbg_id):$/;" m class:Breakpoint -set_features .\runner.py /^ def set_features(self):$/;" m class:Runner -set_file .\ui\vimui.py /^ def set_file(self,file):$/;" m class:SourceWindow -set_height .\ui\vimui.py /^ def set_height(self,height):$/;" m class:Window -set_line .\breakpoint.py /^ def set_line(self,line):$/;" m class:LineBreakpoint -set_line .\ui\vimui.py /^ def set_line(self,lineno):$/;" m class:SourceWindow -set_listener_details .\ui\vimui.py /^ def set_listener_details(self,addr,port,idekey):$/;" m class:Ui -set_logger .\log.py /^ def set_logger(cls, logger):$/;" m class:Log -set_source_position .\ui\vimui.py /^ def set_source_position(self,file,lineno):$/;" m class:Ui -set_status .\ui\vimui.py /^ def set_status(self,status):$/;" m class:StatusWindow -shutdown .\log.py /^ def shutdown(cls):$/;" m class:Log -shutdown .\log.py /^ def shutdown(self):$/;" m class:FileLogger -shutdown .\log.py /^ def shutdown(self):$/;" m class:Logger -shutdown .\log.py /^ def shutdown(self):$/;" m class:WindowLogger -sock .\dbgp.py /^ sock = None$/;" v class:Connection -socket .\dbgp.py /^import socket$/;" i -socket .\runner.py /^import socket$/;" i -sourcewin .\ui\interface.py /^ sourcewin = None$/;" v class:Ui -stack_get .\dbgp.py /^ def stack_get(self):$/;" m class:Api -stackwin .\ui\interface.py /^ stackwin = None$/;" v class:Ui -status .\dbgp.py /^ def status(self):$/;" m class:Api -statuswin .\ui\interface.py /^ statuswin = None$/;" v class:Ui -step_into .\dbgp.py /^ def step_into(self):$/;" m class:Api -step_into .\runner.py /^ def step_into(self):$/;" m class:Runner -step_out .\dbgp.py /^ def step_out(self):$/;" m class:Api -step_out .\runner.py /^ def step_out(self):$/;" m class:Runner -step_over .\dbgp.py /^ def step_over(self):$/;" m class:Api -step_over .\runner.py /^ def step_over(self):$/;" m class:Runner -stop .\dbgp.py /^ def stop(self):$/;" m class:Api -subprocess .\util.py /^ import subprocess$/;" i -sys .\log.py /^import sys$/;" i -time .\dbgp.py /^import time$/;" i -time .\log.py /^ def time(self):$/;" m class:Logger -time .\log.py /^import time$/;" i -time .\util.py /^import time$/;" i -toggle_breakpoint_window .\runner.py /^ def toggle_breakpoint_window(self):$/;" m class:Runner -trace .\runner.py /^ def trace(self,code):$/;" m class:Runner -tracewin .\ui\interface.py /^ tracewin = None $/;" v class:Ui -transID .\dbgp.py /^ transID = 0$/;" v class:Api -type .\breakpoint.py /^ type = "call"$/;" v class:CallBreakpoint -type .\breakpoint.py /^ type = "conditional"$/;" v class:ConditionalBreakpoint -type .\breakpoint.py /^ type = "exception"$/;" v class:ExceptionBreakpoint -type .\breakpoint.py /^ type = "line"$/;" v class:LineBreakpoint -type .\breakpoint.py /^ type = "return"$/;" v class:ReturnBreakpoint -type .\breakpoint.py /^ type = "watch"$/;" v class:WatchBreakpoint -type .\breakpoint.py /^ type = None$/;" v class:Breakpoint -type_and_size .\dbgp.py /^ def type_and_size(self):$/;" m class:ContextProperty -ui .\runner.py /^import vdebug.ui.vimui$/;" i -ui .\ui\vimui.py /^import vdebug.ui.interface$/;" i -unlink_api .\breakpoint.py /^ def unlink_api(self):$/;" m class:Store -unmap .\util.py /^ def unmap(self):$/;" m class:Keymapper -update_lines .\breakpoint.py /^ def update_lines(self,lines):$/;" m class:Store -update_stack .\runner.py /^ def update_stack(self):$/;" m class:Runner -urllib .\util.py /^import urllib$/;" i -util .\runner.py /^import vdebug.util$/;" i -util .\ui\vimui.py /^import vdebug.util$/;" i -var_regex .\event.py /^ var_regex = {$/;" v class:CursorEvalEvent -vdebug .\breakpoint.py /^import vdebug.log$/;" i -vdebug .\dbgp.py /^import vdebug.log$/;" i -vdebug .\event.py /^import vdebug.log$/;" i -vdebug .\event.py /^import vdebug.opts$/;" i -vdebug .\runner.py /^import vdebug.breakpoint$/;" i -vdebug .\runner.py /^import vdebug.dbgp$/;" i -vdebug .\runner.py /^import vdebug.log$/;" i -vdebug .\runner.py /^import vdebug.opts$/;" i -vdebug .\runner.py /^import vdebug.ui.vimui$/;" i -vdebug .\runner.py /^import vdebug.util$/;" i -vdebug .\ui\vimui.py /^import vdebug.log$/;" i -vdebug .\ui\vimui.py /^import vdebug.opts$/;" i -vdebug .\ui\vimui.py /^import vdebug.ui.interface$/;" i -vdebug .\ui\vimui.py /^import vdebug.util$/;" i -vdebug .\util.py /^import vdebug.log$/;" i -vdebug .\util.py /^import vdebug.opts$/;" i -vim .\event.py /^import vim$/;" i -vim .\runner.py /^import vim$/;" i -vim .\ui\vimui.py /^import vim$/;" i -vim .\util.py /^import vim$/;" i -vimui .\runner.py /^import vdebug.ui.vimui$/;" i -visual_eval .\event.py /^ def visual_eval(self):$/;" m class:Dispatcher -watchwin .\ui\interface.py /^ watchwin = None$/;" v class:Ui -win32gui .\util.py /^ import win32gui$/;" i -write .\ui\interface.py /^ def write(self, msg):$/;" m class:Window -write .\ui\vimui.py /^ def write(self, msg, return_focus = True):$/;" m class:LogWindow -write .\ui\vimui.py /^ def write(self, msg, return_focus = True):$/;" m class:StackWindow -write .\ui\vimui.py /^ def write(self, msg, return_focus = True):$/;" m class:TraceWindow -write .\ui\vimui.py /^ def write(self, msg, return_focus = True):$/;" m class:WatchWindow -write .\ui\vimui.py /^ def write(self, msg, return_focus = True, after = "normal G"):$/;" m class:Window -xml .\dbgp.py /^import xml.etree.ElementTree as ET$/;" i diff --git a/plugin/python/vdebug/ui/tags b/plugin/python/vdebug/ui/tags deleted file mode 100644 index 97f9585b..00000000 --- a/plugin/python/vdebug/ui/tags +++ /dev/null @@ -1,130 +0,0 @@ -!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/ -!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/ -!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/ -!_TAG_PROGRAM_NAME Exuberant Ctags // -!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/ -!_TAG_PROGRAM_VERSION 5.8 // -BreakpointWindow .\vimui.py /^class BreakpointWindow(Window):$/;" c -ContextGetResponseRenderer .\vimui.py /^class ContextGetResponseRenderer(ResponseRenderer):$/;" c -LogWindow .\vimui.py /^class LogWindow(Window):$/;" c -ResponseRenderer .\vimui.py /^class ResponseRenderer:$/;" c -SourceWindow .\vimui.py /^class SourceWindow(vdebug.ui.interface.Window):$/;" c -StackGetResponseRenderer .\vimui.py /^class StackGetResponseRenderer(ResponseRenderer):$/;" c -StackWindow .\vimui.py /^class StackWindow(Window):$/;" c -StatusWindow .\vimui.py /^class StatusWindow(Window):$/;" c -TraceWindow .\vimui.py /^class TraceWindow(Window):$/;" c -Ui .\interface.py /^class Ui():$/;" c -Ui .\vimui.py /^class Ui(vdebug.ui.interface.Ui):$/;" c -WatchWindow .\vimui.py /^class WatchWindow(Window):$/;" c -Window .\interface.py /^class Window:$/;" c -Window .\vimui.py /^class Window(vdebug.ui.interface.Window):$/;" c -__all__ .\__init__.py /^__all__ = ["interface","vimui"]$/;" v -__create_tabs .\vimui.py /^ def __create_tabs(self):$/;" m class:ContextGetResponseRenderer file: -__del__ .\interface.py /^ def __del__(self):$/;" m class:Ui file: -__del__ .\interface.py /^ def __del__(self):$/;" m class:Window file: -__get_buf_list .\vimui.py /^ def __get_buf_list(self):$/;" m class:Ui file: -__get_marker .\vimui.py /^ def __get_marker(self,property):$/;" m class:ContextGetResponseRenderer file: -__get_srcwin_name .\vimui.py /^ def __get_srcwin_name(self):$/;" m class:Ui file: -__get_srcwinno_by_name .\vimui.py /^ def __get_srcwinno_by_name(self,name):$/;" m class:Ui file: -__init__ .\interface.py /^ def __init__(self):$/;" m class:Ui -__init__ .\vimui.py /^ def __init__(self,breakpoints):$/;" m class:Ui -__init__ .\vimui.py /^ def __init__(self,response):$/;" m class:ResponseRenderer -__init__ .\vimui.py /^ def __init__(self,response,title = None,contexts = {},current_context = 0):$/;" m class:ContextGetResponseRenderer -__init__ .\vimui.py /^ def __init__(self,ui,open_cmd):$/;" m class:Window -__init__ .\vimui.py /^ def __init__(self,ui,winno):$/;" m class:SourceWindow -__render_property .\vimui.py /^ def __render_property(self,p,next_p,last = False,indent = 0):$/;" m class:ContextGetResponseRenderer file: -accept_renderer .\vimui.py /^ def accept_renderer(self,renderer):$/;" m class:Window -add_breakpoint .\vimui.py /^ def add_breakpoint(self,breakpoint):$/;" f -breakpoint_sign_id .\vimui.py /^ breakpoint_sign_id = '6146'$/;" v class:SourceWindow -buffer_empty .\vimui.py /^ def buffer_empty(self):$/;" m class:Window -clean .\interface.py /^ def clean(self):$/;" m class:Window -clean .\vimui.py /^ def clean(self):$/;" m class:Window -clear_signs .\vimui.py /^ def clear_signs(self):$/;" m class:SourceWindow -close .\interface.py /^ def close(self):$/;" m class:Ui -close .\vimui.py /^ def close(self):$/;" m class:Ui -command .\vimui.py /^ def command(self, cmd):$/;" m class:Window -command .\vimui.py /^ def command(self,cmd):$/;" m class:Ui -command .\vimui.py /^ def command(self,cmd,silent = True):$/;" m class:SourceWindow -create .\interface.py /^ def create(self):$/;" m class:Window -create .\vimui.py /^ def create(self):$/;" m class:Window -creation_count .\vimui.py /^ creation_count = 0$/;" v class:Window -delete .\vimui.py /^ def delete(self,start_line,end_line):$/;" m class:Window -destroy .\interface.py /^ def destroy(self):$/;" m class:Window -destroy .\vimui.py /^ def destroy(self):$/;" m class:Window -error .\vimui.py /^ def error(self,string):$/;" m class:Ui -file .\vimui.py /^ file = None$/;" v class:SourceWindow -focus .\vimui.py /^ def focus(self):$/;" m class:SourceWindow -get_breakpoint_sign_positions .\vimui.py /^ def get_breakpoint_sign_positions(self):$/;" m class:Ui -get_current_file .\vimui.py /^ def get_current_file(self):$/;" m class:Ui -get_current_line .\vimui.py /^ def get_current_line(self):$/;" m class:Ui -get_current_row .\vimui.py /^ def get_current_row(self):$/;" m class:Ui -get_file .\vimui.py /^ def get_file(self):$/;" m class:SourceWindow -get_line .\vimui.py /^ def get_line(self,row):$/;" m class:Ui -getwinnr .\vimui.py /^ def getwinnr(self):$/;" m class:Window -insert .\interface.py /^ def insert(self, msg, position = None):$/;" m class:Window -insert .\vimui.py /^ def insert(self, msg, lineno = None, overwrite = False, allowEmpty = False):$/;" m class:Window -interface .\vimui.py /^import vdebug.ui.interface$/;" i -is_modified .\vimui.py /^ def is_modified(self):$/;" m class:Ui -is_open .\interface.py /^ is_open = False$/;" v class:Window -is_visible .\vimui.py /^ is_visible = False$/;" v class:BreakpointWindow -log .\interface.py /^ def log(self):$/;" m class:Ui -log .\vimui.py /^import vdebug.log$/;" i -logwin .\interface.py /^ logwin = None$/;" v class:Ui -mark_as_stopped .\vimui.py /^ def mark_as_stopped(self):$/;" m class:Ui -name .\interface.py /^ name = "WINDOW"$/;" v class:Window -name .\vimui.py /^ name = "DebuggerBreakpoints"$/;" v class:BreakpointWindow -name .\vimui.py /^ name = "DebuggerLog"$/;" v class:LogWindow -name .\vimui.py /^ name = "DebuggerStack"$/;" v class:StackWindow -name .\vimui.py /^ name = "DebuggerStatus"$/;" v class:StatusWindow -name .\vimui.py /^ name = "DebuggerWatch"$/;" v class:TraceWindow -name .\vimui.py /^ name = "DebuggerWatch"$/;" v class:WatchWindow -name .\vimui.py /^ name = "WINDOW"$/;" v class:Window -on_create .\interface.py /^ def on_create(self):$/;" m class:Window -on_create .\vimui.py /^ def on_create(self):$/;" f -on_create .\vimui.py /^ def on_create(self):$/;" m class:LogWindow -on_create .\vimui.py /^ def on_create(self):$/;" m class:StackWindow -on_create .\vimui.py /^ def on_create(self):$/;" m class:StatusWindow -on_create .\vimui.py /^ def on_create(self):$/;" m class:TraceWindow -on_create .\vimui.py /^ def on_create(self):$/;" m class:WatchWindow -open .\interface.py /^ def open(self):$/;" m class:Ui -open .\vimui.py /^ def open(self):$/;" m class:Ui -open_cmd .\vimui.py /^ open_cmd = "new"$/;" v class:Window -opts .\vimui.py /^import vdebug.opts$/;" i -place_breakpoint .\vimui.py /^ def place_breakpoint(self,sign_id,file,line):$/;" m class:Ui -place_pointer .\vimui.py /^ def place_pointer(self,line):$/;" m class:SourceWindow -pointer_sign_id .\vimui.py /^ pointer_sign_id = '6145'$/;" v class:SourceWindow -prevline .\vimui.py /^ prevline = 0$/;" v class:SourceWindow -register_breakpoint .\vimui.py /^ def register_breakpoint(self,breakpoint):$/;" m class:Ui -remove_breakpoint .\vimui.py /^ def remove_breakpoint(self,breakpoint):$/;" m class:Ui -remove_breakpoint .\vimui.py /^ def remove_breakpoint(self,breakpoint_id):$/;" f -remove_conn_details .\vimui.py /^ def remove_conn_details(self):$/;" m class:Ui -remove_pointer .\vimui.py /^ def remove_pointer(self):$/;" m class:SourceWindow -render .\vimui.py /^ def render(self):$/;" m class:ResponseRenderer -render .\vimui.py /^ def render(self):$/;" m class:StackGetResponseRenderer -render .\vimui.py /^ def render(self,indent = 0):$/;" m class:ContextGetResponseRenderer -say .\interface.py /^ def say(self,string):$/;" m class:Ui -say .\vimui.py /^ def say(self,string):$/;" m class:Ui -set_conn_details .\vimui.py /^ def set_conn_details(self,addr,port):$/;" m class:Ui -set_file .\vimui.py /^ def set_file(self,file):$/;" m class:SourceWindow -set_height .\vimui.py /^ def set_height(self,height):$/;" m class:Window -set_line .\vimui.py /^ def set_line(self,lineno):$/;" m class:SourceWindow -set_listener_details .\vimui.py /^ def set_listener_details(self,addr,port,idekey):$/;" m class:Ui -set_source_position .\vimui.py /^ def set_source_position(self,file,lineno):$/;" m class:Ui -set_status .\vimui.py /^ def set_status(self,status):$/;" m class:StatusWindow -sourcewin .\interface.py /^ sourcewin = None$/;" v class:Ui -stackwin .\interface.py /^ stackwin = None$/;" v class:Ui -statuswin .\interface.py /^ statuswin = None$/;" v class:Ui -ui .\vimui.py /^import vdebug.ui.interface$/;" i -util .\vimui.py /^import vdebug.util$/;" i -vdebug .\vimui.py /^import vdebug.log$/;" i -vdebug .\vimui.py /^import vdebug.opts$/;" i -vdebug .\vimui.py /^import vdebug.ui.interface$/;" i -vdebug .\vimui.py /^import vdebug.util$/;" i -vim .\vimui.py /^import vim$/;" i -watchwin .\interface.py /^ watchwin = None$/;" v class:Ui -write .\interface.py /^ def write(self, msg):$/;" m class:Window -write .\vimui.py /^ def write(self, msg, return_focus = True):$/;" m class:LogWindow -write .\vimui.py /^ def write(self, msg, return_focus = True):$/;" m class:StackWindow -write .\vimui.py /^ def write(self, msg, return_focus = True):$/;" m class:TraceWindow -write .\vimui.py /^ def write(self, msg, return_focus = True):$/;" m class:WatchWindow -write .\vimui.py /^ def write(self, msg, return_focus = True, after = "normal G"):$/;" m class:Window From 16c33e5ec2157541c99202da312514f16f5210cb Mon Sep 17 00:00:00 2001 From: "Ryu, Han-seok" Date: Mon, 8 Sep 2014 17:58:57 +0900 Subject: [PATCH 04/16] first commit --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index 55b26ffa..ed5e24df 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,22 @@ +# Quick Start + +You are good to go if using python 2.7 and windows 7. +In python code press and debugger will start. + +# Added command + +VdebugTrace + +will trace expression or variables of which you want to watch continuous change. + +[usage] + +:VdebugTrace {expression or variables} + +# KOMODO pydbgp + +(patch ver.) included + # Vdebug [![Build Status](https://travis-ci.org/joonty/vdebug.png?branch=master)](https://travis-ci.org/joonty/vdebug) From f0e40f921c461bbd474f842688f935daaad894a1 Mon Sep 17 00:00:00 2001 From: "Ryu, Han-seok" Date: Mon, 8 Sep 2014 18:00:26 +0900 Subject: [PATCH 05/16] first commit --- .gitignore | 2 - .travis.php.ini | 1 - .travis.yml | 17 - Gemfile | 6 - Gemfile.lock | 34 - HISTORY | 113 -- LICENCE | 18 - Rakefile | 39 - VERSION | 1 - build.sh | 21 - doc/Vdebug.txt | 1145 ----------------- features/correct_window_setup.feature | 64 - features/eval.feature | 15 - .../debugger_command_steps.rb | 9 - features/step_definitions/evaluate_steps.rb | 4 - features/step_definitions/php_steps.rb | 6 - .../step_definitions/source_file_steps.rb | 9 - .../step_definitions/stack_window_steps.rb | 21 - .../step_definitions/status_window_steps.rb | 7 - .../step_definitions/watch_window_steps.rb | 7 - features/support/env.rb | 27 - features/support/helpers.rb | 45 - features/unicode_in_source_buffer.feature | 15 - features/valid_file_names.feature | 26 - plugin/python/.start_vdebug.py.un~ | Bin 7701 -> 0 bytes plugin/python/start_vdebug.py | 261 ---- plugin/python/vdebug/.dbgp.py.un~ | Bin 3575 -> 0 bytes plugin/python/vdebug/.runner.py.swo | 0 plugin/python/vdebug/.runner.py.swp | 0 plugin/python/vdebug/.runner.py.un~ | Bin 9683 -> 0 bytes plugin/python/vdebug/__init__.py | 0 plugin/python/vdebug/breakpoint.py | 262 ---- plugin/python/vdebug/dbgp.py | 709 ---------- plugin/python/vdebug/event.py | 268 ---- plugin/python/vdebug/log.py | 131 -- plugin/python/vdebug/opts.py | 55 - plugin/python/vdebug/runner.py | 381 ------ plugin/python/vdebug/ui/.vimui.py.swp | 0 plugin/python/vdebug/ui/.vimui.py.un~ | Bin 15179 -> 0 bytes plugin/python/vdebug/ui/__init__.py | 1 - plugin/python/vdebug/ui/interface.py | 60 - plugin/python/vdebug/ui/vimui.py | 625 --------- plugin/python/vdebug/util.py | 238 ---- plugin/vdebug.vim | 255 ---- requirements.txt | 2 - rubylib/vdebug.rb | 143 -- spec/options_command_spec.rb | 79 -- spec/spec_helper.rb | 28 - spec/startup_spec.rb | 15 - spec/vdebug_spec.rb | 190 --- syntax/debugger_breakpoint.vim | 19 - syntax/debugger_log.vim | 20 - syntax/debugger_stack.vim | 19 - syntax/debugger_status.vim | 22 - syntax/debugger_watch.vim | 38 - tests/test_breakpoint_breakpoint.py | 188 --- tests/test_dbgp_api.py | 180 --- tests/test_dbgp_connection.py | 92 -- tests/test_dbgp_context_property.py | 130 -- tests/test_dbgp_response.py | 206 --- tests/test_opts_options.py | 43 - tests/test_util_filepath.py | 137 -- tests/vim.py | 3 - vdebugtests.py | 12 - 64 files changed, 6464 deletions(-) delete mode 100644 .gitignore delete mode 100644 .travis.php.ini delete mode 100644 .travis.yml delete mode 100644 Gemfile delete mode 100644 Gemfile.lock delete mode 100644 HISTORY delete mode 100644 LICENCE delete mode 100644 Rakefile delete mode 100644 VERSION delete mode 100644 build.sh delete mode 100644 doc/Vdebug.txt delete mode 100644 features/correct_window_setup.feature delete mode 100644 features/eval.feature delete mode 100644 features/step_definitions/debugger_command_steps.rb delete mode 100644 features/step_definitions/evaluate_steps.rb delete mode 100644 features/step_definitions/php_steps.rb delete mode 100644 features/step_definitions/source_file_steps.rb delete mode 100644 features/step_definitions/stack_window_steps.rb delete mode 100644 features/step_definitions/status_window_steps.rb delete mode 100644 features/step_definitions/watch_window_steps.rb delete mode 100644 features/support/env.rb delete mode 100644 features/support/helpers.rb delete mode 100644 features/unicode_in_source_buffer.feature delete mode 100644 features/valid_file_names.feature delete mode 100644 plugin/python/.start_vdebug.py.un~ delete mode 100644 plugin/python/start_vdebug.py delete mode 100644 plugin/python/vdebug/.dbgp.py.un~ delete mode 100644 plugin/python/vdebug/.runner.py.swo delete mode 100644 plugin/python/vdebug/.runner.py.swp delete mode 100644 plugin/python/vdebug/.runner.py.un~ delete mode 100644 plugin/python/vdebug/__init__.py delete mode 100644 plugin/python/vdebug/breakpoint.py delete mode 100644 plugin/python/vdebug/dbgp.py delete mode 100644 plugin/python/vdebug/event.py delete mode 100644 plugin/python/vdebug/log.py delete mode 100644 plugin/python/vdebug/opts.py delete mode 100644 plugin/python/vdebug/runner.py delete mode 100644 plugin/python/vdebug/ui/.vimui.py.swp delete mode 100644 plugin/python/vdebug/ui/.vimui.py.un~ delete mode 100644 plugin/python/vdebug/ui/__init__.py delete mode 100644 plugin/python/vdebug/ui/interface.py delete mode 100644 plugin/python/vdebug/ui/vimui.py delete mode 100644 plugin/python/vdebug/util.py delete mode 100644 plugin/vdebug.vim delete mode 100644 requirements.txt delete mode 100644 rubylib/vdebug.rb delete mode 100644 spec/options_command_spec.rb delete mode 100644 spec/spec_helper.rb delete mode 100644 spec/startup_spec.rb delete mode 100644 spec/vdebug_spec.rb delete mode 100644 syntax/debugger_breakpoint.vim delete mode 100644 syntax/debugger_log.vim delete mode 100644 syntax/debugger_stack.vim delete mode 100644 syntax/debugger_status.vim delete mode 100644 syntax/debugger_watch.vim delete mode 100644 tests/test_breakpoint_breakpoint.py delete mode 100644 tests/test_dbgp_api.py delete mode 100644 tests/test_dbgp_connection.py delete mode 100644 tests/test_dbgp_context_property.py delete mode 100644 tests/test_dbgp_response.py delete mode 100644 tests/test_opts_options.py delete mode 100644 tests/test_util_filepath.py delete mode 100644 tests/vim.py delete mode 100644 vdebugtests.py diff --git a/.gitignore b/.gitignore deleted file mode 100644 index c6537e41..00000000 --- a/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -*.pyc -doc/tags diff --git a/.travis.php.ini b/.travis.php.ini deleted file mode 100644 index cf52bd6d..00000000 --- a/.travis.php.ini +++ /dev/null @@ -1 +0,0 @@ -xdebug.remote_enable=1 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7ca5d312..00000000 --- a/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: python -python: - - "2.6" - - "2.7" -rvm: 1.9.3 -notifications: - irc: "irc.freenode.org#vdebug" -before_install: - - sudo apt-get update && sudo apt-get install vim-gtk php5-cli php5-xdebug -before_script: - - "export DISPLAY=:99.0" - - "sh -e /etc/init.d/xvfb start" - - "bundle install" -# command to install dependencies -install: pip install -r requirements.txt --use-mirrors -# command to run tests -script: bundle exec rake travis diff --git a/Gemfile b/Gemfile deleted file mode 100644 index bc67b59a..00000000 --- a/Gemfile +++ /dev/null @@ -1,6 +0,0 @@ -source 'https://rubygems.org' - -gem 'rake', '~> 10.0.4' -gem 'rspec', '~> 2.13.0' -gem 'vimrunner', '~> 0.3.0' -gem 'cucumber' diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 1cde0885..00000000 --- a/Gemfile.lock +++ /dev/null @@ -1,34 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - builder (3.2.2) - cucumber (1.3.3) - builder (>= 2.1.2) - diff-lcs (>= 1.1.3) - gherkin (~> 2.12.0) - multi_json (~> 1.7.5) - multi_test (~> 0.0.1) - diff-lcs (1.2.4) - gherkin (2.12.0) - multi_json (~> 1.3) - multi_json (1.7.7) - multi_test (0.0.1) - rake (10.0.4) - rspec (2.13.0) - rspec-core (~> 2.13.0) - rspec-expectations (~> 2.13.0) - rspec-mocks (~> 2.13.0) - rspec-core (2.13.1) - rspec-expectations (2.13.0) - diff-lcs (>= 1.1.3, < 2.0) - rspec-mocks (2.13.1) - vimrunner (0.3.0) - -PLATFORMS - ruby - -DEPENDENCIES - cucumber - rake (~> 10.0.4) - rspec (~> 2.13.0) - vimrunner (~> 0.3.0) diff --git a/HISTORY b/HISTORY deleted file mode 100644 index d56c3fda..00000000 --- a/HISTORY +++ /dev/null @@ -1,113 +0,0 @@ -=== Vdebug 1.4.2 / 2014-05-15 - -Bug fixes: - * Allow overriding of options dictionary after sourcing vdebug (issues #112, #113) - * Show local file path in stack window if using path mapping (issue #118) - * Change function names for stricter rules introduced in Vim v.7.4.260 (thanks @BlackEagle, #158 and #155) - -Documentation: - * Various fixes - * Mention vim-nox package for Debian (thanks @henningda, #138) - * Add Python installation for Windows information (issue #135) - -Features: - * Add completion to :Breakpoint command (thanks @tommcdo, #124) - * Add VdebugStart command (thanks @blueyed, #132) - * Sleep for 100ms in wait loop, don't consume as much CPU (thanks @blueyed, #133) - -=== Vdebug 1.4.1 / 2013-06-09 - -Bug fixes: - * Fix folds being forgotten after debugging (issue #56) - * Don't overwrite features array if it exists (issue #59) - * Mapping of single modes (thanks @xbot, #66) - * Stop empty buffers from being created (issue #70) - * Fix ElementTree deprecation warning (thanks @InFog, #89) - * Fix minheight error for windows (thanks @zhaocai, #73, also #84) - * Fix filename handling on windows (thanks @Chronial, #74) - * Use :mkexrc for restoring keymapping (thanks @Chronial and @qstrahl, #75) - * Fix window destruction (thanks @Chronial, #76) - * Inspect PHP constants with cursor eval (issue #80) - * Don't cut final character when inspecting variables at end of line (issue #85) - -Documentation: - * Test suite requirements (thanks @michaeltwofish, #61) - * Add helptag instructions to README (issue #67) - * Add 'eval_visual' to documentation (issue #88) - -=== Vdebug 1.4.0 / 2013-03-06 - -Features: - * Set debugger features with g:vdebug_features dictionary (issue #55) - * Allow use of '~' in log files (issue #53) - -Bug fixes: - * Print error message if trying to start debugger with unsaved buffers (issue #57) - * Don't allow visual eval outside of debugging session (issue #52) - * Show updated key mappings in status window (issue #51) - * Fix problem with stuck breakpoints after debugging (issue #48, #43) - * Swap back to original tab after debugging session closes (issue #23) - -=== Vdebug 1.3.2 / 2013-01-28 - -Features: - * Don't allow breakpoints to be set on empty lines (issue #27) - * Add :VdebugOpt command for easy setting and getting of options (issue #38) - -Bug fixes: - * Small fixes for documentation (thanks: https://github.com/grota, #31) - * Parse continuous mode option as an integer (thanks: https://github.com/grota, #32) - * Stop Xdebug hanging when using the detach command (issue #33) - * Don't use recursive Vim mapping (issue #34) - * Track movement of line breaks with Vim signs (issue #35) - * Add "default" keyword to highlights, to allow custom colours (issue #36) - * Fix check for multibyte support (issue #37) - * Fix deprecation warning in Python 2.6, catching string exceptions (issue #39) - * Stop source code panel opening in incorrect position (issue #40) - -=== Vdebug 1.3.1 / 2012-12-21 - -Bug fixes: - * Filepath problems with Windows version - -Other: - * Packaged tests as an easy-to-run suite - * Set up on Travis CI - -=== Vdebug 1.3.0 / 2012-12-19 - -Features: - * Added minor version number to versioning, for bug fixes - * Support and compatibility fixes for debugging Tcl, plus help file updates - * Non-multibyte Vim installations now use ASCII watch window marker characters as a fallback (thanks: https://github.com/satiani, #21) - * Watch window marker characters are fully customizable - * Added breakpoint list function to Api class - * Satiani added multiple file path mappings, for remote debugging (thanks: https://github.com/satiani, #20) - * Vdebug re-maps previous key mappings after shutting down (issue #16) - * Added 'watch_window_style' option that allows for a compact or (default) expanded watch window (thanks: https://github.com/georgjaehnig, #13) - * Simple continuous mode added, where vdebug starts listening after a connection closes, to allow for debugging to start again immediately (issue #19) - -Bug fixes: - * Fix for watch window characters on Windows versions of Vim (issue #29) - * Fix for watch window variable expansion on Windows versions of Vim (issue #28) - * Stopped creating empty buffers every time Vdebug started (issue #25) - * Fixed bug with file URI quoting - * Fixed escaping of characters when calling eval (issue #15) - - -=== Vdebug 1.2 / 2012-10-05 - - * Support for nodejs debugging using the komodo-debug package in NPM - * Keyboard interrupt while Vim is waiting for a connection (thanks: http://github.com/artnez, #6) - * Fixed overwriting dir function with badly named variable (thanks: http://github.com/csomme, #8) - * Function keys for debugger are only mapped when the session starts, and are unmapped when it's closed (issue #1) - * Removed the help tags file from the git repo (issue #10) - -=== Vdebug 1.1 / 2012-08-30 - - * Fix for Windows file paths (thanks: http://github.com/beatle, #4) - * Watch window trees can be closed as well as opened (issue #5) - -=== Vdebug 1.0 / 2012-08-14 - - * First release! diff --git a/LICENCE b/LICENCE deleted file mode 100644 index 9870b97b..00000000 --- a/LICENCE +++ /dev/null @@ -1,18 +0,0 @@ -Copyright © 2012 Jon Cairns - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -The Software is provided "as is", without warranty of any kind, express or -implied, including but not limited to the warranties of merchantability, -fitness for a particular purpose and noninfringement. In no event shall the -authors or copyright holders be liable for any claim, damages or other liability, -whether in an action of contract, tort or otherwise, arising from, out of or in -connection with the software or the use or other dealings in the Software. diff --git a/Rakefile b/Rakefile deleted file mode 100644 index 23139ab1..00000000 --- a/Rakefile +++ /dev/null @@ -1,39 +0,0 @@ -require 'rspec/core/rake_task' -require 'cucumber' -require 'cucumber/rake/task' - -task :travis do - system("export DISPLAY=:99.0 && bundle exec rake test:all") - raise "Tests failed!" unless $?.exitstatus == 0 -end - -namespace :test do - desc "Run all tests (unit and integration/specs)" - task :all do - puts "Running unit tests" - Rake::Task["test:unit"].execute - puts "Running integration (spec) tests" - Rake::Task[:spec].execute - puts "Running cucumber features" - Rake::Task[:features].execute - end - - desc "Run unit tests" - task :unit do - cmd = "python vdebugtests.py" - puts cmd - system cmd - end - - desc "Run integration tests (alias for `spec`)" - task :integration do - Rake::Task[:spec] - end -end - -RSpec::Core::RakeTask.new(:spec) -Cucumber::Rake::Task.new(:features) do |t| - t.cucumber_opts = "features --format pretty" -end - -task :default => "test:all" diff --git a/VERSION b/VERSION deleted file mode 100644 index 9df886c4..00000000 --- a/VERSION +++ /dev/null @@ -1 +0,0 @@ -1.4.2 diff --git a/build.sh b/build.sh deleted file mode 100644 index 7f369c47..00000000 --- a/build.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -${1?"Usage: $0 VERSION"} -version=$1 -echo "Building vdebug version $version" -echo -echo " -> Running tests" -if python vdebugtests.py -then - echo " -> OK." - echo " -> Creating tar from working directory..." - if tar -cvzf vdebug-$version.tar.gz doc/Vdebug.txt plugin syntax tests HISTORY LICENCE README.md requirements.txt vdebugtests.py VERSION - then - echo " -> OK, created tar at vdebug-$version.tar.gz." - else - echo " -> ERROR: failed to build tar, exiting" - exit 1 - fi -else - echo " -> ERROR: tests failed, exiting" - exit 1 -fi diff --git a/doc/Vdebug.txt b/doc/Vdebug.txt deleted file mode 100644 index 75608472..00000000 --- a/doc/Vdebug.txt +++ /dev/null @@ -1,1145 +0,0 @@ -*Vdebug* A powerful, fast, multi-language debugger for Vim - - - 888 888 888 888 - 888 888 888 888 - 888 888 888 888 - Y88b d88P .d88888 .d88b. 88888b. 888 888 .d88b. - Y88b d88P d88" 888 d8P Y8b 888 "88b 888 888 d88P"88b - Y88o88P 888 888 88888888 888 888 888 888 888 888 - Y888P Y88b 888 Y8b. 888 d88P Y88b 888 Y88b 888 - Y8P "Y88888 "Y8888 88888P" "Y88888 "Y88888 - 888 - Y8b d88P - "Y88P" - - - -=============================================================================== -CONTENTS *Vdebug-contents* - - 1. Introduction..................................|VdebugIntro| - 1.1 Debugging................................|VdebugIntroDebugging| - 1.2 The DBGP protocol........................|VdebugIntroDBGP| - 1.3 Supported languages......................|VdebugIntroLanguages| - 2. Installing the plugin.........................|VdebugInstallation| - 3. Setting up the debugging environment..........|VdebugSetUp| - 3.1 PHP set up...............................|VdebugSetUpPHP| - 3.2 Python set up............................|VdebugSetUpPython| - 3.3 Ruby set up..............................|VdebugSetUpRuby| - 3.4 Perl set up..............................|VdebugSetUpPerl| - 3.5 NodeJS set up............................|VdebugSetUpNodejs| - 3.6 TCL/Wish set up..........................|VdebugSetUpTcl| - 4. Usage.........................................|VdebugUsage| - 4.1 Starting the debugger....................|VdebugStart| - 4.2 Finding your way around the UI...........|VdebugUI| - 4.2.1 The source window..................|VdebugSourceWindow| - 4.2.2 The watch window...................|VdebugWatchWindow| - 4.2.3 The stack window...................|VdebugStackWindow| - 4.2.4 The status window..................|VdebugStatusWindow| - 4.2.5 The breakpoint window..............|VdebugBreakpointWindow| - 4.2.6 The log window.....................|VdebugLogWindow| - 4.3 Commands.................................|VdebugCommands| - 4.3.1 Run................................|VdebugCommandRun| - 4.3.2 Step over..........................|VdebugCommandStepOver| - 4.3.3 Step in............................|VdebugCommandStepIn| - 4.3.4 Step out...........................|VdebugCommandStepOut| - 4.3.5 Run to cursor......................|VdebugCommandRunToCursor| - 4.3.6 Detach.............................|VdebugCommandDetach| - 4.3.7 Stop/close.........................|VdebugCommandStop| - 4.4 Breakpoints..............................|VdebugBreakpoints| - 4.4.1 Setting a line breakpoint..........|VdebugSetLineBreakpoint| - 4.4.2 Setting other breakpoints..........|VdebugSetBreakpoints| - 4.4.3 Viewing your breakpoints...........|VdebugViewBreakpoints| - 4.4.4 Removing breakpoints...............|VdebugRemoveBreakpoints| - 4.5 Evaluating code..........................|VdebugEval| - 4.5.1 Evaluating any expression..........|VdebugEvalExpression| - 4.5.2 Evaluating highlighted expressions.|VdebugEvalHighlighted| - 4.5.3 Evaluating variable under cursor |VdebugEvalUnderCursor| - 5. Options.......................................|VdebugOptions| - 5.1 Quickly setting options..................|VdebugOpt| - 5.2 List of options..........................|VdebugOptionList| - 6. Key maps......................................|VdebugKeys| - 7. Setting debugger features.....................|VdebugFeatures| - 8. Using an IDE key..............................|VdebugIDEKey| - 9. Debugging a script on a remote server.........|VdebugRemote| - 9.1 File path mapping........................|VdebugRemoteFilePaths| - 9.2 Connecting the two machines..............|VdebugRemoteConnection| - 10. Troubleshooting..............................|VdebugTroubleshooting| - 11. Acknowledgements.............................|VdebugAcknowledgements| - -============================================================================== -1. Introduction *VdebugIntro* - -So what does this plugin actually do? - -It provides an interface for debugging scripts, allowing you to halt execution, -view the variables at the current position and find out exactly what's going on -in your program. It supports the DBGP protocol, which includes all types of -breakpoint, code snippet evaluation, and more. - ------------------------------------------------------------------------------- -1.1 Debugging *VdebugIntroDebugging* - -Debugging is mainly used to do what the name suggests: weed out bugs that are -appearing in your program. Using a debugging tool means that you don't have to -resort to 'print' statements or writing out to logs to find out where your -program is going wrong: you can pause execution, step through line by line and -break at certain points to see what's going on. - -This is nothing new, and IDEs have been supporting debuggers for many years. In -fact, Vim has had several plugins that support debuggers, most notably the long -line of related Xdebug plugins for PHP. - -So why have I created a new one? There are a few reasons: - - * The Xdebug plugin was getting too complicated, and all the code was in - one file, making it difficult to navigate and maintain. - * It wasn't truly multi-language, and was mainly focussed on Xdebug with - PHP. I wanted a debugger that could work identically with any language - that had debuggers using the DBGP protocol. - * There were some inefficiencies in the Xdebug plugin that affected the - speed, which I knew could be addressed. - * I wanted to create a set of Python classes that could be used on their - own outside of Vim, that provided an interface to debuggers. - * There were extra features that I wanted to build in, and doing so in the - original plugin would have meant a rewrite anyway. - -I hope you find this plugin helpful and enjoyable to use :) - ------------------------------------------------------------------------------- -1.2 The DBGP protocol *VdebugIntroDBGP* - -This is a protocol that defines the communication between an IDE and debugger -engine. The IDE speaks to the engine in pre-defined plain text commands, such -as: > - - breakpoint_set -i 10 -t line -f /home/user/example.php -n 5 -< -The debugger engine replies in XML, such as: > - - -< -That makes the protocol cross platform and pretty easy to implement. One of the -Python modules (files), called 'dbgp.py', is a set of classes that provide -socket handling and a object-oriented interface to the most common operations. - -For a complete description of the DBGP protocol visit: - http://xdebug.org/docs-dbgp.php - ------------------------------------------------------------------------------- -1.3 Supported languages *VdebugIntroLanguages* - -Technically, supported languages include any that have a debugging engine that -uses the DBGP protocol. This plugin was designed with four languages in mind, -PHP, Python, Ruby and Perl. These have all been tested with this plugin. For -information on how to configure the environment with each of these languages -see section 3, |VdebugSetUp|. - -============================================================================== -2. Installing the plugin *VdebugInstallation* - -Please note that you must have VIM 7+ for this plugin to work, and it must be -compiled with tabs, signs and Python support. If you're using Windows, some -reports have said that Python must be installed separately to allow VIM to use -it. - -The Github page for the plugin is https://github.com/joonty/vdebug, and the VIM -scripts URL is http://www.vim.org/scripts/script.php?script_id=4170. - -By far the easiest way to install is by using a plugin manager, e.g. vundle -(https://github.com/gmarik/vundle/) or pathogen -(https://github.com/tpope/vim-pathogen.git). If you have one of these, follow -the normal installation procedure. - -If you aren't using a plugin manager, you have to do it the long way. Either -clone the Github repository or download the ZIP from VIM scripts. - -Move the contents of each folder in the plugin (e.g. syntax/, plugin/) into -the corresponding folder in your VIM home directory - create the directories -if they don't exist. The VIM home directory is: > - $HOME/.vim -< -on Linux/Unix, or: > - %USERPROFILE%\vimfiles -< -on Windows. The %USERPROFILE% directory on Windows is usually: > - C:\Users\[User name]\ -< -or: > - C:\Documents and Settings\[User name]\ -< - -You may also use the system plugin directory for VIM on your system if you want -to install for all users. - -============================================================================== -3. Setting up the debugging environment *VdebugSetUp* - -This section looks at setting up the debugger engine to allow Vdebug to -communicate with it during execution. The set-up varies depending on the -language and operating system, and I can't possibly list all combinations here. -What I will do is explain how I set it up for each language on my Linux system -(Ubuntu 12.04), and hopefully that will give enough information for you to be -able to apply it to your circumstance. - ------------------------------------------------------------------------------- -3.1 PHP set up *VdebugSetUpPHP* - -The most popular DBGP debugger for PHP is Xdebug. - -I find that the most effective way to install Xdebug is to use PECL, instead -of a OS-level package manager such as aptitude or yum. You can also compile it -from source if you're feeling hardy. To install it via PECL, run this from a -command line (requires root/admin privileges): > - - pecl install xdebug -< -When this finishes, it will tell you about a library (.so on *nix, .dll on -Windows) that needs to be included. Copy down the file path, as we need to add -it as a zend extension. This can be done in the PHP INI file, but in Ubuntu -I can add a new file to /etc/php5/conf.d/ that contains all the configuration -options and gets loaded automatically by PHP. - -Add these options to the INI file: > - - zend_extension=/path/to/xdebug.so - xdebug.remote_enable=on - xdebug.remote_handler=dbgp - xdebug.remote_host=localhost - xdebug.remote_port=9000 -< -If using Apache, restart it to enable the new library. The command line -interface should be ready to go - type "php -v" and you should see the line > - with Xdebug v2.2.0, Copyright (c) 2002-2012, by Derick Rethans -< -or something similar (version may differ). You are technically ready to go, but -there's one extra step that I like to do to make command line debugging nice -and quick. I create a bash script called "php-xdebug", which automatically -starts the debugger engine. The script looks like this (unix only): > - -#!/bin/bash -export XDEBUG_CONFIG="idekey=xdebug" -/usr/bin/php "$@" -< -Run "chmod +x" on the file and put it somewhere in your $PATH list, and you can -then use this instead of php when debugging. For instance, instead of "php -myscript.php", run "php-xdebug myscript.php" to start the debugger session. - -You are now officially ready to start debugging with PHP. However, if you've -become unstuck at any point then there are plenty of Google tutorials on -setting up Xdebug, or you can email me and I'll do my best to help. - ------------------------------------------------------------------------------- -3.2 Python set up *VdebugSetUpPython* - -Python has an standalone debugging tool that you can use from the command line, -but to use Vdebug in conjunction with your Python scripts you will have to grab -the "pydbgp" tool, created by ActiveState (who make the Komodo Edit/IDE -software). - -To do this, go to http://code.activestate.com/komodo/remotedebugging/, -download the Python client for your OS and extract it. - -Inside this package is a binary file called pydbgp that we can include when -running a script, which will allow for remote debugging. If you're using -version 8 or greater, then you will need to move the dbgp directory, which is -inside pythonlib, to the same directory that contains the pydbgp executable. -If you don't do this then you will get an error saying "No module named -dbgp.client". - -To debug a script called "myscript.py", run the following: > - python -S path/to/pydbgp -d localhost:9000 myscript.py -< -adding in the path to the pydbgp binary file. Running it without starting -Vdebug will give an error saying that it can't connect to the host. If you see -this, you're ready to go. - -NOTE: You may have a problem when trying to do an "eval". If you get an error -mentioning something about not providing a length then you need to patch the -client.py file in the Python remote debugger source code. I've created a patch -that you can get at https://gist.github.com/3348076. It will only apply cleanly -if it's for the same version as the package you downloaded. - -If using unix you can use the `patch` command to apply the changes, e.g: > - - patch dbgp/client.py < client-7.1.0.patch -< -If you're still having trouble, drop me an email. - ------------------------------------------------------------------------------- -3.3 Ruby set up *VdebugSetUpRuby* - -Like Python, Ruby has an standalone debugging tool that you can use from the -command line, but to use Vdebug in conjunction with your Ruby scripts you will -have to get the "rdbgp.rb" script that comes bundled with Komodo Edit/IDE by -Activestate. - -Get the latest Komodo IDE from -http://downloads.activestate.com/Komodo/releases/ (e.g. version 7.1.1), and -unpack it. There's a script called rdbgp.rb, which, in the linux version, is -located at INSTALLDIR/lib/support/dbgp/rubylib/. This script needs to be -included when debugging another script remotely. - -To start debugging, you need to set two environment variables: one for the -location of the directory containing the rdbgp.rb script and one for settings -used by the debugger: > - export RUBYDB_LIB=path/to/rubylib/ - export RUBYDB_OPTS="HOST=localhost PORT=9000" -< -For example, if we want to debug a Ruby script called "myscript.rb", run the -following from the command line: > - export RUBYDB_LIB=~/KomodoIDE/INSTALLDIR/lib/support/dbgp/rubylib - export RUBYDB_OPTS="HOST=localhost PORT=9000" - ruby -I$RUBYDB_LIB -r $RUBYDB_LIB/rdbgp.rb myscript.rb -< -Change the environment variables to suit your set-up and you will be ready to -go. - -NOTE: You may have a problem when changing context in the watch window. If you -get a long error message when switching to globals, for instance, you will need -to patch your commands/context.rb file in the rubylib directory. I've created a -patch that you can get at https://gist.github.com/3347567 - if using unix you -can use the patch command to apply it, e.g: > - - patch rubylib/commands/context.rb < context.patch -< -If you're still having trouble, drop me an email. - ------------------------------------------------------------------------------- -3.4 Perl set up *VdebugSetUpPerl* - -Perl is one of the trickier languages to set up, unless you have very specific -instructions on what to do. Fortunately, that's what I'm going to give you! - -Like Python and Ruby, Activestate provide a standalone module that you can use -to remotely debug Perl applications. What makes this more difficult than Python -and Ruby is that the debugging script changes and, as far as I can see, breaks -after a particular version. That means you have to get the right version from -Activestate, and working that out on your own is a bit of a pain. - -Fortunately, I'm going to make it easy for you and give you the exact version -to download. Go to the archive at -http://downloads.activestate.com/Komodo/releases/archive/4.x/4.4.1/remotedebugging -and download the archive with "Perl" in the name that suits your operating system. - -Just a reminder that, from here, the instructions are for Linux. Activestate -have instructions for other systems on their website. - -Unpack the archive somewhere on your system. There is a perl5db.pl script that -you will need to include to enable debugging. To do this you need to set some -environment variables to point to the directory containing this file: > - export PERL5LIB=/path/to/Komodo-PerlRemoteDebugging-xxx/ - export PERL5DB="BEGIN { require q($PERL5LIB/perl5db.pl)}" - export PERLDB_OPTS="RemotePort=localhost:9000" - export DBGP_IDEKEY="whatever" -< -The second line is for good measure, making sure the right file is included -when perl starts up. The third line sets debugger options, and the fourth line -allows you to set an IDE key if you want to use one (Vdebug allows you to -restrict connections to a single IDE key, but by default all connections will -be picked up - see section |VdebugIDEKey|). - -To start a Perl script with the debugger engine activated, e.g. myscript.pl, -run: > - perl -d myscript.pl -< -If you haven't started Vdebug you will get a message saying that it can't -connect. This means you've set it up correctly. - ------------------------------------------------------------------------------- -3.5 NodeJS set up *VdebugSetUpNodejs* - -NodeJS is the easiest language to set up for debugging with Vdebug, as -Activestate have made the debugger engine available through npm. All you need -to do is run: > - npm install komodo-debug -g -< - -You can then begin a debug session by starting Vdebug and running: > - node-dbgp -h 127.0.0.1 -p 9000 myscript.js -< -Where the 'h' option specifies the address that Vdebug is listening on, and 'p' -is the port. - ------------------------------------------------------------------------------- -3.6 TCL/Wish set up *VdebugSetUpTcl* - -Like Python and Ruby, Tcl and Wish have an standalone debugging tool that you -can use from the command line, which has again been made avilable by -ActiveState. - -Go to http://code.activestate.com/komodo/remotedebugging/, download the Tcl -client for your OS and extract it. Inside this package is a binary file called -dbgp_tcldebug that we will use instead of the tcl/wish binary. It accepts the -script as an option, along with the vdebug server address and port. - -If we want to debug a Tcl script called "myscript.tcl", start Vdebug listening -and run the following: > - path/to/dbgp_tcldebug -dbgp localhost:9000 -app-file myscript.tcl \ - -app-shell /usr/bin/tcl -< -To debug a wish script called "mywishscript.tcl", run the following: > - path/to/dbgp_tcldebug -dbgp localhost:9000 -app-file mywishscript.tcl \ - -app-shell /usr/bin/wish -< -Note that the only difference is the app shell argument. - -There is a known error with using "tix", however, as it appears that Activestate's -debugger engine doesn't support it. - -============================================================================== -4. Usage *VdebugUsage* - -This section deals with how to use Vdebug to debug a script. It assumes that -you've already set up the debugger with the language that you're using: if you -haven't see |VdebugSetUp|. - ------------------------------------------------------------------------------- -4.1 Starting the debugger *VdebugStart* - -The default key for starting the debugger is . Pressing this should show -the message: > - Waiting for a connection (this message will self-destruct in 30 seconds...) -< -(If you don't get this message see the section on troubleshooting, -|VdebugTroubleshooting|) - -Vdebug is now listening for an incoming connection, which will be started when -a script is run with the debugger engine activated. View the section -|VdebugSetUp| to see the necessary steps to start a script in this way. It will -be obvious when a connection is made, because a new VIM tab opens with four -windows, signalling the start of a new debugging session. - -If you are starting a script but Vdebug does not react, see the -|VdebugTroubleshooting| section for information. - -The debugger will pause at the first line of the beginning of the script. It -then waits for your action before continuing. - ------------------------------------------------------------------------------- -4.2 Finding your way around the UI *VdebugUI* - -Now that you are in debug mode you will see 4 windows. The far left window -shows the file at the current point of execution, |VdebugSourceWindow|. The top -right window is the watch window, showing the variables at the current context, -|VdebugWatchWindow|. The middle right window shows the stack, or the trace, up -to that point in the script, |VdebugStackWindow|. The bottom right window shows -the current debugger status, connection details and a help message. - ------------------------------------------------------------------------------- -4.2.1 The source window *VdebugSourceWindow* - -This shows the current position of the debugger. The file will automatically -change as the debugger pauses in different parts of the code, and the current -line is shown with a "->" sign in the margin. - -Don't edit the contents of the file when in debug mode, and especially don't -edit without saving - this causes problems when swapping between files. - -You can set line breakpoints here with the key or :Breakpoint, and can -tell the debugger to run to the cursor with . - ------------------------------------------------------------------------------- -4.2.2 The watch window *VdebugWatchWindow* - -The watch window shows the variables at the current position in execution. The -variable name, type, length (if applicable) and value are shown. They are shown -as a tree, because arrays/lists and objects have children. Hopefully it's -fairly self-explanatory: right arrows show a closed tree, down arrows show an -open tree and diamonds show variables that don't have children. These markers -can be customised (see |VdebugOptions|), and will fall back to ASCII equivalents -if multi byte support is not enabled in the VIM configuration. - -To open a closed tree, navigate to a line with a closed tree (right arrow) and -press () or double-click if you have mouse-support enabled. This -will open the tree, and show all the children. - -There are two style options for the watch window: expanded (default) and compact. -The expanded version has a new line between each variable, and uses separator -strings to indicate relationships. The compact version has a variable on each -line, and works better for smaller screens. To set this option, see -|VdebugOptions-watch_window_style|. - -The watch window automatically updates every time the debugger pauses, so -nothing needs to be done on your part. - -You can also see variables from different contexts. For example, PHP has normal -context variables and global variables, and the debugging engine differentiates -between them. The options are shown in a sort of tab interface at the top of -the watch window, and you can switch to a different context by pressing -() on the context you want, or double-clicking on it with your mouse if you -have mouse support enabled. The currently showing context is highlighted (if -you have syntax highlighting on) and starts with an asterix. - -The watch window is also used to show the results of "eval" operations. See -the |VdebugEval| section for more on that. After evaluating an expression you -can return to the variable context with (default). - ------------------------------------------------------------------------------- -4.2.3 The stack window *VdebugStackWindow* - -The stack window shows the current execution stack, which is a list of files -and functions/methods that the program has run through to get to the current -position. The top entry ([0]) is always the current position, and the entries -below show the path the script has taken. - -Like the watch window, the stack will update automatically every time the -debugger pauses. You can jump to a place in the stack by putting your cursor -over a line and pressing () or by double clicking with your mouse -(if you have mouse support enabled). - ------------------------------------------------------------------------------- -4.2.4 The status window *VdebugStatusWindow* - -The status window shows several things. At the top of the window it shows the -debugger's status, which is a message the engine sends to Vdebug. It will say -when it's starting, running, breaking or stopping. - -The two lines below show the connection details. The first of these lines show -which address and port Vdebug is binding itself to (defaults to localhost:9000) -and the second shows the address and port that the engine has used to connect. -If you're debugging a script on your machine then the IP address will be the -same as localhost. It's only when you're debugging a script on a remote server -that it will be any different. However, the port used will be, to all intents -and purposes, random. - -The bottom line is just a helpful message, reminding you how to start and where -to go for help! - ------------------------------------------------------------------------------- -4.2.5 The breakpoint window *VdebugBreakpointWindow* - -This is a bit of an odd one out, as it doesn't show by default and can be -summoned at will. It lists all the breakpoints that have been set, and shows -the IDs that can be used to remove them. - -To open the window use the command :BreakpointWindow. It's in a table format, -so hopefully it won't need any more explanation. To close the window again, -just re-type :BreakpointWindow or :q. - -To see more about breakpoints see |VdebugBreakpoints|. - ------------------------------------------------------------------------------- -4.2.6 The log window *VdebugLogWindow* - -Another odd one out, this only appears in two situations: - 1. You have the "debug_window_level" option set to >= 1 - 2. An error occurs - -In the case of 1), the window will open as soon as a debugging session starts. -This isn't recommended for normal use, as it noticeably slows the interface -down. In the case of 2), the window will automatically open when an error happens. - -If you want to log things, it's better to use file logging (see -|VdebugLogFile|). - ------------------------------------------------------------------------------- -4.3 Commands *VdebugCommands* - -This section will describe the basic commands that you will need to start -debugging, and the default keys mapped to those commands. - - 4.3.1 Run *VdebugCommandRun* - Default key: - Tells the debugger engine to run, which it will do until it meets a - breakpoint or the end of the script. - - 4.3.2 Step over *VdebugCommandStepOver* - Default key: - Tells the debugger engine to step to the next statement, e.g. the next line - of the script. Useful for going through a problem section of the script - with a fine toothcomb. - - 4.3.3 Step in *VdebugCommandStepIn* - Default key: - Tells the debugger engine to step into a statement on the current line. - For instance, if there's a function call on the current line it will jump to - the start of that function. - - 4.3.4 Step out *VdebugCommandStepOut* - Default key: - Tells the debugger engine to step out of the current statement into the - calling statement. Essentially this is the opposite of step in. - - 4.3.5 Run to cursor *VdebugCommandRunToCursor* - Default key: - Tells the debugger engine to run until the point where the cursor is - currently sitting. One of the most useful commands, as it means that - setting a hard breakpoint is not always necessary. This only works if the - cursor is in the source window, otherwise it doesn't make sense! But it - also doesn't need to be a point in the current file, just somewhere that - the execution is going to hit. - - 4.3.6 Detach *VdebugCommandDetach* - Default key: - Tells the debugger engine to break away and continue execution as normal. - At this point, breakpoints are forgotten and Vdebug doesn't have any more - control over execution. An alternative to "stop", which kills the program. - - 4.3.7 Stop/close *VdebugCommandStop* - Default key: - Tells the debugger engine to stop the program, killing it at the point it's - reached. If the program has already been stopped it closes the debugger UI. - ------------------------------------------------------------------------------- -4.4 Breakpoints *VdebugBreakpoints* - -This section explains how to set and remove line breakpoints, and also how to -set more advanced types of breakpoint. It also explains how to manage your list -of breakpoints. - -There are several types of breakpoint, and their support varies between -debugger engines. The breakpoint types are: - - * Line: break at a line in a given file - * Conditional: break at a line in a file when a given condition is true - * Exception: break when a given exception is thrown - * Call: break when a given function is called - * Return: break when returning from a given function - * Watch: break when a variable or address is written - ------------------------------------------------------------------------------- -4.4.1 Setting a line breakpoint *VdebugSetLineBreakpoint* - -This is the simplest kind of breakpoint to set, as it can be done in a single -button press. The reason for this is that it is visual: put the cursor over the -line and activate the breakpoint - all the work is then done to tell the -debugger to break at this file and line number. - -To set a breakpoint, make sure you're in the source window and place the VIM -cursor over the line you want to break at. Press to set a line breakpoint, -or type :Breakpoint. The line is then highlighted. To remove the breakpoint -just repeat the action on the same line. - ------------------------------------------------------------------------------- -4.4.2 Setting other breakpoints *VdebugSetBreakpoints* - -You can set any type of breakpoint using the :Breakpoint command. The syntax -is: > - :Breakpoint -< -Using :Breakpoint without any arguments sets a line breakpoint at the current -cursor position. - -The options for type are: - - * line - * conditional - * exception - * return - * call - * watch - -Each type has its own interpretation of the following arguments. The "line" -type breakpoint is covered in the previous section, |VdebugSetLineBreakpoint|. - -:Breakpoint conditional *VdebugSetBreakpoints-conditional* - Extends the line breakpoint. Sets a breakpoint on the current file and - line, but only if evaluates to true. Everything after - 'conditional' is treated as the condition, and it must be valid code in the - current language. E.g: > - - :Breakpoint conditional $x == 2 -< - -:Breakpoint exception *VdebugSetBreakpoints-exception* - Sets a breakpoint to activate when an exception is thrown. The full name of - the exception should be provided. E.g: > - - :Breakpoint exception PDOException -< - -:Breakpoint call *VdebugSetBreakpoints-call* - Sets a breakpoint to activate when a function is called. The debugger stops - at the first line of the function. Note that the syntax for - varies between debugger engine and is NOT well documented. In fact, Xdebug - doesn't mention how to set a breakpoint on class/object methods, and I have - had limited success in doing so. Global functions work without a problem, - e.g: > - - :Breakpoint call open_file -< - In PHP, it seems that you need to use static method syntax to break at - methods, even if the method isn't static. If I have a class called Foo and - a method on it called bar(), I would use: > - - :Breakpoint call Foo::bar -< - This seems to work, but I'm not guaranteeing it! - -:Breakpoint return *VdebugSetBreakpoints-return* - Sets a breakpoint to activate when a function returns. The debugger stops - at the return line of the function. Note that this suffers from the same - problem as , and setting class/object methods may not be possible. - Read the call documentation for more on that. However, global functions - work without a problem. E.g: > - - :Breakpoint return open_file -< - -:Breakpoint watch *VdebugSetBreakpoints-watch* - Sets a breakpoint to activate when a variable or address is written. This - is not supported by Xdebug, so don't get your hopes up. Still, if it did - work then it might look like this: > - - :Breakpoint watch $myvar -< - ------------------------------------------------------------------------------- -4.4.3 Viewing your breakpoints *VdebugViewBreakpoints* - -To see your current list of breakpoints, use the :BreakpointWindow command to -open a window showing a tabular list. You can read more about it at -|VdebugBreakpointWindow|. - ------------------------------------------------------------------------------- -4.4.4 Removing breakpoints *VdebugRemoveBreakpoints* - -Line breakpoints can be removed by pressing (default) or :Breakpoint while -on a line with an existing breakpoint. Other types of breakpoint can be removed -using the command: > - :BreakpointRemove -< -The breakpoint's ID can be found in the breakpoint window (see -|VdebugBreakpointWindow|), in the first column. For example: > - :BreakpointRemove 11000 -< -To remove all breakpoints in one go use the command: > - :BreakpointRemove * -< - ------------------------------------------------------------------------------- -4.5 Evaluating code *VdebugEval* - -You can evaluate code snippets at the current point of execution, which can be -used to see the result of a condition, arithmetic expressions, etc. These -snippets are written in the language that's being debugged. There are two ways -of evaluating expresions: you can either write them yourself -(|VdebugEvalExpression|) or use visual highlighting to select an expression from -the source window. - -On evaluating an expression, the result is shown in the watch window. To return -back to the context view, press (default). - ------------------------------------------------------------------------------- -4.5.1 Evaluating any expression *VdebugEvalExpression* - -To evaluate an expression, use the command :VdebugEval: > - :VdebugEval -< - -The result is shown on the watch window. E.g: > - :VdebugEval $x + 2 -< - ------------------------------------------------------------------------------- -4.5.2 Evaluating highlighted expressions *VdebugEvalHighlighted* - -Use visual highlighting (default command "v") to select an expression that you -want to evalute and type "e" (leader key followed by the letter "e"). -The result of the evaluation is shown on the watch window. - ------------------------------------------------------------------------------- -4.5.3 Evaluating the variable under cursor *VdebugEvalUnderCursor* - -You can evaluate the variable under the cursor in the watch window with -(default key). Note that only variables before the current line will have a -value, and trying to evaluate uninitialized variables may cause an error with -some debugger engines. - -============================================================================== -5. Options *VdebugOptions* - -There are two ways of setting options for Vdebug. The options are stored in a -Vim dictionary (the equivalent of an associative array in PHP or a hash in Ruby). -This dictionary can be modified using the global variable "g:vdebug_options". -However, as you may want to change options on the fly, a command (:VdebugOpt) -has been added for your convenience so that you can easily get and set options -without having to use Vim dictionary syntax. - -I've found that the best way of setting options is to use the dictionary in your -vimrc file and the :VdebugOpt command when you want to set options on the fly. - ------------------------------------------------------------------------------- -5.1 Quickly setting options with :VdebugOpt *VdebugOpt* - -The VdebugOpt command takes one or two arguments: one if you want to retrieve -the value of an option, and two if you want to set the option to a new value. -The first argument autocompletes with a list of options, and the second argument -will autocomplete to the current value, if set. Here are some examples: > - - :VdebugOpt server " Prints the current value - :VdebugOpt continuous_mode 0 "Sets to 0 - :VdebugOpt debug_file /home/jon/vdebug.log -< -Note that using :VdebugOpt only sets the value of the option for the time that -your vim session is open. As soon as you close it they will be forgotten, so -retain option settings by adding them to your vimrc. - ------------------------------------------------------------------------------- -5.2 List of options *VdebugOptionList* - -The default options look like this: > - let g:vdebug_options= { - \ "port" : 9000, - \ "server" : 'localhost', - \ "timeout" : 20, - \ "on_close" : 'detach', - \ "break_on_open" : 1, - \ "ide_key" : '', - \ "path_maps" : {}, - \ "debug_window_level" : 0, - \ "debug_file_level" : 0, - \ "debug_file" : "", - \ "watch_window_style" : 'expanded', - \ "marker_default" : '⬦', - \ "marker_closed_tree" : '▸', - \ "marker_open_tree" : '▾' - \} -< -You can either use the multi-line notation like above, or set individual keys: -> - g:vdebug_options['port'] = 9001 -< -You only need to set the options you want to change: the defaults will be used -if you don't set them. - -Here is a list of all the available options. - - *VdebugOptions-port* -g:vdebug_options["port"] (default = 9000) - This sets the port that Vdebug will use to listen for connections. Xdebug - defaults to 9000, and it's the normal port for DBGP, so only change it if - you also change the port that the engine uses. - - *VdebugOptions-server* -g:vdebug_options["server"] (default = "localhost") - Sets the address that Vdebug will use to listen for connections. It - defaults to localhost, as it assumes that the debugger engine will be - running on the same machine and also connecting to localhost. If you want - to debug a script on a different machine, look at |VdebugRemote|. - - *VdebugOptions-timeout* -g:vdebug_options["timeout"] (default = 20) - Number of seconds to wait for when listening for a connection. VIM will - lock up due to the server socket listening for a client connection, so this - timeout is there to protect your VIM from locking up forever! - - *VdebugOptions-on_close* -g:vdebug_options["on_close"] (default = "detach") - The default action when stopping the debugger. By default, it will detach - the debugger engine meaning that the script will execute until it finishes. - The other option is "stop", which means that the script will be killed - immediately. - - *VdebugOptions-break_on_open* -g:vdebug_options["break_on_open"] (default = 1) - This determines whether the debugger should stop on the first line of the - script, or just immediately start running until it hits a pre-defined - breakpoint. - - *VdebugOptions-ide_key* -g:vdebug_options["ide_key"] (default = empty) - The IDE key that Vdebug will watch for with incoming connections. This - allows you to differentiate between connections, and only start a session - when this key matches the incoming key. This is empty by default, which - means that any incoming connection will be accepted. Filling in a value - restricts the connections to those that have a matching key. See - |VdebugIDEKey| for more information. - - *VdebugOptions-path_maps* -g:vdebug_options["path_maps"] (default = {}) - This is only used for debugging a script on a remote machine. This is used - to map remote file paths to local file paths, as they are very likely to be - different. This is a VimL dictionary of mappings between remote files (keys) - and local files (values). - - *VdebugOptions-debug_window_level* -g:vdebug_options["debug_window_level"] (default = 0) - Sets the amount of information sent to the log window, |VdebugLogWindow|. - The default value, 0, only shows errors. The other options are 1 - (information) and 2 (debug). The latter option is not ideal to use, as it - noticeably slows down the interface due to the amount of window writes. - It's far better to use file logging (|VdebugOptions-debug_file_level|) for - debugging. - - *VdebugOptions-debug_file_level* -g:vdebug_options["debug_file_level"] (default = 0) - Sets the amount of information written to the log file, which is set with - the |VdebugOptions-debug_file| option. The default value, 0, only shows - errors. The other options are 1 (information) and 2 (debug). - - *VdebugOptions-debug_file* -g:vdebug_options["debug_file"] (default = empty) - Sets the path to the log file, which writes information set by - |VdebugOptions-debug_file_level|. This is empty by default, meaning that - file logging is turned off. Enter a file path to enable file logging. - - *VdebugOptions-watch_window_style* -g:vdebug_options["watch_window_style"] (default = 'expanded') - Sets the style of the watch window, 'expanded' or 'compact'. The compact - version works better for smaller screens, but the expanded version looks - a bit nicer in my opinion. - - *VdebugOptions-marker_default* -g:vdebug_options["marker_default"] (default = '⬦') - Sets the marker used for a variable in the watch window that has no - children. A "*" symbol is used if multi byte support is not enabled. - - *VdebugOptions-marker_closed_tree* -g:vdebug_options["marker_closed_tree"] (default = '▸') - Sets the marker used for a variable in the watch window that does have - children, but the tree is currently closed. A "+" symbol is used if multi - byte support is not enabled. - - *VdebugOptions-marker_open_tree* -g:vdebug_options["marker_open_tree"] (default = '▾') - Sets the marker used for a variable in the watch window that does have - children, and the tree is currently open. A "-" symbol is used if multi - byte support is not enabled. - - *VdebugOptions-continuous_mode* -g:vdebug_options["continuous_mode"] (default = 0) - If enabled, Vdebug will start listening immediately after a debugging - session has finished, allowing for constant debugging across separate - requests. Press during a debugging session to stop this, or - when Vdebug is listening. - -============================================================================== -6. Key maps *VdebugKeys* - -By default, function keys are mapped to execute debugger commands. However, I'm -aware that people may already have them mapped to something else, so would like -to change the default behaviour. Before you do that, be aware that Vdebug only -maps two commands outside of the debugger mode, "run" and "set_breakpoint". All -others are mapped only when Vdebug starts up, and unmapped when it shuts down. -Not only this, but any commands that you have already mapped to these keys will -be remembered and restored when you come out of debugging mode. - -If you would still like to remap the default keys, this is possible using the -key map dictionary, g:vdebug_keymap: > - - let g:vdebug_keymap = { - \ "run" : "", - \ "run_to_cursor" : "", - \ "step_over" : "", - \ "step_into" : "", - \ "step_out" : "", - \ "close" : "", - \ "detach" : "", - \ "set_breakpoint" : "", - \ "get_context" : "", - \ "eval_under_cursor" : "", - \ "eval_visual" : "e", - \} -< - -As you can see, these are the default keys. You can change the keys using the -multi-line notation as shown above, or by setting individual keys: > - - let g:vdebug_keymap['run'] = '' -< -Any options that you don't set will use the default value. - -============================================================================== -7. Setting debugger features *VdebugFeatures* - -The DBGP protocol allows you to set features for debugging, such as the max -length of data that the debugger returns. You can set these features in the Vim -dictionary g:vdebug_features, and they will be sent to the debugger when you -start a new debugging session. - -For example: > - let g:vdebug_features['max_depth'] = 2048 -< - -This will send the command to the debugger to set the "max_depth" feature to -2048. - -For a list of features supported by DBGP see -http://xdebug.org/docs-dbgp.php#feature-names. - -============================================================================== -8. Using an IDE Key *VdebugIDEKey* - -An IDE key is used to restrict debugger connections, kind of like a password: -only a connection that supplies the same key as the IDE uses (in this case -Vdebug) will be used, otherwise it's ignored. For instance, using Xdebug and -PHP with Netbeans requires you to use the IDE key "netbeans-xdebug". - -You can tell Vdebug to use an IDE key with the option -"g:vdebug_options['ide_key']" (see |VdebugOptions-ide_key|). This is empty by -default, so all connections will be picked up, even if an IDE key has been set -on the debugger engine side of things. It's useful to leave the IDE key option -empty if you're having trouble getting a connection, as it's one less thing to -have to worry about. - -If you do set an IDE key and a connection comes in with a different IDE key, it -will be ignored (and there will be a message saying so). - -However, I find it best to leave out the IDE key all the time, as I use VIM for -all my debugging and don't have to juggle multiple connections at a time. - -Setting an IDE key varies between debugger implementations. For example, Xdebug -can be initiated from the browser with the GET variable -XDEBUG_SESSION_START=, where is the key for that session. -From the command line, the environment variable "XDEBUG_CONFIG" holds the IDE -key. - -============================================================================== -9. Debugging a script on a remote server *VdebugRemote* - -This is where things get really cool. You don't have to be on the same machine -as the running script to be able to debug it: you can tell the remote script to -use your machine's IP and debugger port, and you can pick up the remote -connection. - -There are a couple of hurdles to overcome in doing this: - - 1. File paths are unlikely to be the same on the local and remote machines - 2. You need to bind Vdebug to the right address, and make sure there's a - network route between the two machines. - ------------------------------------------------------------------------------- -9.1 File path mapping *VdebugRemoteFilePaths* - -Firstly, file paths aren't a problem. You can use the options "remote_path" and -"local_path" to swap out sections of the file URIs to make them compatible with -eachother. - -Let's say we're debugging a file on a remote machine, and the path is -/home/user/scripts/myscript.php. On my machine the same script is located in -/home/jon/php/myscript.php. I would have to set the remote and local path -options as so: > - - let g:vdebug_options['path_maps'] = {"/home/user/scripts": "/home/jon/php"} -< -When the debugger engine sends any file paths, a straight swap of the paths is -done, so all instances of "/home/user/scripts" are replaced with -"/home/jon/php". The opposite is done when sending file paths in the other -direction. - -It is possible to have multiple file path mappings by adding more items in the -"path_maps" dictionary. - ------------------------------------------------------------------------------- -9.2 Connecting the two machines *VdebugRemoteConnection* - -This part depends a lot upon your network set-up and firewall rules. But here's -the basic information: - - * You need to bind Vdebug to an address that's visible to the remote - machine (i.e. not "localhost") - * You must have port 9000 allowed by any firewall you might have on your - machine or router - -I'll give an example of my own here. I had two machines on an internal network, -one was my desktop (192.168.1.1) and the other was a server (192.168.1.2) running -the script that I wanted to debug on my desktop. I configured Xdebug on the -server to use my desktop's IP address as the remote host. I then set the Vdebug -server address to be "192.168.1.1" (NOT "localhost") in the options: > - - let g:vdebug_options['server'] = "192.168.1.1" -< -I also had to set an Xdebug option "remote_connect_back=on" in the INI file on -the server. This combination of things allowed me to accept remote connections -on my desktop. - -The two machines don't have to be on an internal network, but if they aren't -then I can all but guarantee that you will have to route port 9000 to your -machine using your router, as it will be blocked by default. - -============================================================================== -10. Troubleshooting/FAQ *VdebugTroubleshooting* - -If you have any questions or problems that aren't addressed or fixed here then -feel free to raise an issue on the Github page https://github.com/joonty/vdebug -or email me at . If the question is good I might even add -it to this list. - - Q. I can't get the debugger to run! Pressing does nothing. - A. The most common reason for this is that your VIM installation is not - compiled with Python support. To check this, run "vim --version" and check - for any mention of Python. If it is compiled with Python support, try - remapping the start key to something else, e.g: > - :let g:vdebug_keymap['run'] = '' -< - - Q. I'm listening for connections with Vdebug, but when I run the script it - doesn't do anything. - A. This is either due to the debugger engine not being activated, or - differing connection details. Check that the debugger is installed for - the language you're using and that you're doing what's necessary to - activate the engine when running the script (e.g. setting environment - variables/URL variables). If the problem persists, check that the - debugger engine is connecting the same port and address that Vdebug is - binding to (the 'port' and 'server' options). Also check that the IDE - key option is empty. - - Q. I can't debug a script on a remote machine, what's going on? - A. Have you read the section on remote debugging, |VdebugRemote|? I mean, - have you REALLY read it? If you have, then drop me an email with your - problem and I'll try to help. - - Q. I don't seem to be able to get "call" or "return" breakpoints to work, - any idea why? - A. I've only ever been able to get these to work with global functions, not - classes or objects. There is a very small amount of information on the - Interwebs regarding this problem, and Xdebug says that it's been - solved. However, no-one seems to know what syntax to use for class and - object method names. First one to discover it wins a prize! (The prize - of feeling good about helping others) - - Q. When setting a breakpoint I get the message that it isn't supported, why - is that? - A. Implementation of every feature is down to each debugger engine, and - they pick and choose what goes in. Without modifying the engine's - source there's nothing I can do I'm afraid :( - - Q. I can't switch variable context when debugging a Ruby script - I keep - getting a long error. How can I fix it? - A. This is addressed in |VdebugSetUpRuby|. A patch needs to be applied to - the debugger engine code. - - Q. I can't use the eval commands when debugging a Python script - I keep - getting an error about not providing length. How can I fix it? - A. This is addressed in |VdebugSetUpPython|. A patch needs to be applied - to the debugger engine code. - - Q. I am debugging a PHP script and VDebug won't stop at my breakpoint, but - it will stop at other breakpoints. What do I do? - A. You should try reproducing this case outside of your (likely large) - codebase. In the meantime, you can use the xdebug_break() function to - hardcode a breakpoint in your file. - - Q. I keep getting error when doing . - A. Send the details of the error to me at the email address at the top of - this section, or raise an issue on the Github page. Please supply the - version of Vdebug, your Vim version and your OS to make it as easy as - possible to diagnose! - - Q. Can you implement feature ? - A. Maybe - raise an issue on the Github page (top of this section) and I'll - weigh up the benefits vs time. Either that, or you can fork the - repository and try to implement it yourself! I do accept merges. - - Q. Why doesn't Ross, the largest friend, simply eat the other ones? - A. Think of the indigestion that would result. - - -============================================================================== -11. Acknowledgements *VdebugAcknowledgements* - -This plugin was inspired by the original Xdebug plugin created by Seung Woo Shin -( sayclub.com>), -http://www.vim.org/scripts/script.php?script_id=1152. There are even a few -remnants of the original code, but not many. He showed us all that it was -possible. - -Thanks to everyone who's contributed ideas and code so far, including Githubbers -teranex, qstrahl, artnez, csomme and beatle. Also thanks to Gareth Oslar to -pointing out that Vdebug (almost) worked with NodeJS. diff --git a/features/correct_window_setup.feature b/features/correct_window_setup.feature deleted file mode 100644 index 345e610f..00000000 --- a/features/correct_window_setup.feature +++ /dev/null @@ -1,64 +0,0 @@ -Feature: Correct window setup - In order to use Vdebug with all window panels - As a user - I want to see correct watch, stack and status information - - Scenario: The status window - Given I have a file example.php containing - """ - - """ - When I start the debugger with the PHP script example.php - Then the status should be break - And the status window should contain localhost:9000 - - Scenario: The watch window - Given I have a file example.php containing - """ - - """ - And I start the debugger with the PHP script example.php - When I step over - Then the watch window should show $var1 - And the watch window should show $var2 - And the watch window variable $var1 should be (int) 1 - And the watch window variable $var2 should be (uninitialized) - - Scenario: The stack window - Given I have a file example.php containing - """ - - """ - And I start the debugger with the PHP script example.php - When I step over - Then the first item on the stack should show the file example.php - And the first item on the stack should show line 3 - - Scenario: Reading the stack window with multiple files - Given I have a file example.php containing - """ - - """ - And I have a file example2.php containing - """ - - """ - And I start the debugger with the PHP script example.php - When I step in - Then item 1 on the stack should show the file example2.php - And item 1 on the stack should show line 2 - And item 2 on the stack should show the file example.php - And item 2 on the stack should show line 2 diff --git a/features/eval.feature b/features/eval.feature deleted file mode 100644 index aaf2c1dc..00000000 --- a/features/eval.feature +++ /dev/null @@ -1,15 +0,0 @@ -Feature: Evaluating expressions - In order to evaluate variables in Vdebug - As a user - I want to see the evaluated variable in the watch window - - Scenario: Evaluating a PHP expression - Given I have a file example.php containing - """ - - """ - And I start the debugger with the PHP script example.php - When I evaluate $var1 - Then the watch window should show Eval of: '$var1' diff --git a/features/step_definitions/debugger_command_steps.rb b/features/step_definitions/debugger_command_steps.rb deleted file mode 100644 index 3fdd1f72..00000000 --- a/features/step_definitions/debugger_command_steps.rb +++ /dev/null @@ -1,9 +0,0 @@ -When "I step over" do - vdebug.step_over - vdebug.running?.should be(true), "Vdebug is not running: #{vdebug.messages}" -end - -When "I step in" do - vdebug.step_in - vdebug.running?.should be(true), "Vdebug is not running: #{vdebug.messages}" -end diff --git a/features/step_definitions/evaluate_steps.rb b/features/step_definitions/evaluate_steps.rb deleted file mode 100644 index c21079fe..00000000 --- a/features/step_definitions/evaluate_steps.rb +++ /dev/null @@ -1,4 +0,0 @@ -When "I evaluate $expression" do |expr| - vdebug.evaluate expr - vdebug.running?.should be(true), "Vdebug is not running: #{vdebug.messages}" -end diff --git a/features/step_definitions/php_steps.rb b/features/step_definitions/php_steps.rb deleted file mode 100644 index f4827223..00000000 --- a/features/step_definitions/php_steps.rb +++ /dev/null @@ -1,6 +0,0 @@ -Given "I start the debugger with the PHP script $script" do |script| - vdebug.start_listening - full_script_path = Dir.getwd + "/" + script - run_php_script full_script_path - vdebug.running?.should be(true), "Vdebug is not running: #{vdebug.messages}" -end diff --git a/features/step_definitions/source_file_steps.rb b/features/step_definitions/source_file_steps.rb deleted file mode 100644 index 71aeb766..00000000 --- a/features/step_definitions/source_file_steps.rb +++ /dev/null @@ -1,9 +0,0 @@ -Given "I have a file $file containing" do |file, content| - dir = File.dirname(file) - unless dir == '.' - FileUtils.mkdir_p(dir) - end - File.open file, "w" do |f| - f.write content - end -end diff --git a/features/step_definitions/stack_window_steps.rb b/features/step_definitions/stack_window_steps.rb deleted file mode 100644 index c7060def..00000000 --- a/features/step_definitions/stack_window_steps.rb +++ /dev/null @@ -1,21 +0,0 @@ -Then "the first item on the stack should show the file $file" do |file| - vdebug.stack.first[:file].should include file -end - -Then "the first item on the stack should show line $line" do |line| - vdebug.stack.first[:line].should == line -end - -Then "item $item on the stack should show the file $file" do |idx, file| - idx = idx.to_i - stack_length = vdebug.stack.length - stack_length.should be >= idx, "There are only #{stack_length} items on the stack" - vdebug.stack[idx-1][:file].should include file -end - -Then "item $item on the stack should show line $line" do |idx, line| - idx = idx.to_i - stack_length = vdebug.stack.length - stack_length.should be >= idx, "There are only #{stack_length} items on the stack" - vdebug.stack[idx-1][:line].should == line -end diff --git a/features/step_definitions/status_window_steps.rb b/features/step_definitions/status_window_steps.rb deleted file mode 100644 index 946f6fae..00000000 --- a/features/step_definitions/status_window_steps.rb +++ /dev/null @@ -1,7 +0,0 @@ -Then "the status should be $status" do |status| - vdebug.status.should == status -end - -Then "the status window should contain $string" do |string| - vdebug.status_window_content.should include string -end diff --git a/features/step_definitions/watch_window_steps.rb b/features/step_definitions/watch_window_steps.rb deleted file mode 100644 index 0850b13c..00000000 --- a/features/step_definitions/watch_window_steps.rb +++ /dev/null @@ -1,7 +0,0 @@ -Then "the watch window should show $text" do |text| - vdebug.watch_window_content.should include text -end - -Then "the watch window variable $var should be $value" do |var, value| - vdebug.watch_vars[var].should == value -end diff --git a/features/support/env.rb b/features/support/env.rb deleted file mode 100644 index 7cd18066..00000000 --- a/features/support/env.rb +++ /dev/null @@ -1,27 +0,0 @@ -require 'vimrunner' -require 'securerandom' -require_relative "../../rubylib/vdebug" - -begin - TMP_DIR = "tmpspace_#{SecureRandom::hex(3)}" - PHP_INI = File.expand_path('../../../.travis.php.ini', __FILE__) - - Before do - Dir.mkdir TMP_DIR unless Dir.exists? TMP_DIR - Dir.chdir TMP_DIR - - # Setup plugin in the Vim instance - plugin_path = File.expand_path('../../..', __FILE__) - vim.add_plugin(plugin_path, 'plugin/vdebug.vim') - end - - After do - kill_vim - Dir.chdir '..' - system "rm -r #{TMP_DIR}" - end - -rescue Exception - system "rm -r #{TMP_DIR}" - raise -end diff --git a/features/support/helpers.rb b/features/support/helpers.rb deleted file mode 100644 index 16bccbd3..00000000 --- a/features/support/helpers.rb +++ /dev/null @@ -1,45 +0,0 @@ -require 'shellwords' - -module VdebugHelper - def vdebug - @vdebug ||= Vdebug.new vim - end - - def vim - @vim ||= Vimrunner.start - end - - def kill_vim - if @vim - @vim.kill - @vim = nil - if @vdebug - @vdebug.remove_lock_file! - @vdebug = nil - end - end - end -end - -module ScriptRunner - STDERR_FILE = "error.out" - - def run_php_script(path) - fork_and_run "php -c #{PHP_INI}", Shellwords.escape(path) - end - - def stderr_contents - File.read(STDERR_FILE) - end - - def fork_and_run(bin, argstr) - fork do - exec %Q{XDEBUG_CONFIG="idekey=something" /usr/bin/env #{bin} #{argstr} 2>#{STDERR_FILE}} - exit! - end - sleep 0.5 - end -end - -World(VdebugHelper) -World(ScriptRunner) diff --git a/features/unicode_in_source_buffer.feature b/features/unicode_in_source_buffer.feature deleted file mode 100644 index 1540e9c7..00000000 --- a/features/unicode_in_source_buffer.feature +++ /dev/null @@ -1,15 +0,0 @@ -Feature: Unicode in source buffer - In order to use Vdebug with all character sets - As a user - I want to debug code that uses Unicode characters - - Scenario: Debug a PHP file containing Unicode characters - Given I have a file test.php containing - """ - '中文'); - ?> - """ - And I start the debugger with the PHP script test.php - When I step over - Then the watch window should show $arr diff --git a/features/valid_file_names.feature b/features/valid_file_names.feature deleted file mode 100644 index 7c9ac0bc..00000000 --- a/features/valid_file_names.feature +++ /dev/null @@ -1,26 +0,0 @@ -Feature: Valid file names - In order to use Vdebug with all file names - As a user - I want to debug a file with any valid system characters - - Scenario: Debug a PHP file containing spaces - Given I have a file My File.php containing - """ - - """ - And I start the debugger with the PHP script My File.php - When I step over - Then the watch window should show $var - - Scenario: Debug a PHP file with a space in the directory - Given I have a file A Path/myfile.php containing - """ - - """ - And I start the debugger with the PHP script A Path/myfile.php - When I step over - Then the watch window should show $var diff --git a/plugin/python/.start_vdebug.py.un~ b/plugin/python/.start_vdebug.py.un~ deleted file mode 100644 index d766ccdc400a3a19f7f2c747e8bcf174d46f0117..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7701 zcmeI1zi-n(6vv(Zp#10$pan`R;Of#Ufhq%{OGPDw5MtnmL!caMWX>sNr@d0i zcJpa7kfCtBVBRjzI7Mk@Xz~DQCuxfGFewDBR%2>od9)2jI}Ga+j*_%g8}*AreWb_G z`%R*jLMM?u@W9l@qsIzI%2?~C^?OO-`X8h~aRTh~azbr2|=<$xMtdDSDXF zN~#4UkLXT9PkUmoTB7$<(KD*_R_Q`-ql*E}C7rpZXsJF{Qq1LLt}+|-v(>mrXQEgD`*u<-h>J6%T^LAW0bYn9@FX7Y5N?B-8mCzJ#_JI# z4UzsNMJ#kGp3#qju4e$c5kUmBedtF5pn??7rvxIL5JxyTZgYrhJ3;K{5cz&E!UtR( z><)oake1NH1V40SGU|5Dtyo4B&EVr~JFP zEkL}F<>W%ypS-6Yl2*4QnhQX?PF^r(MAZ6^mds{1+cb!0u3&SA%f1; z-sLuj)>97}itT3k#i?o}f`%+pZ;RAIa0x&=g-!wuUWg$zPtqE&)xLw;Ic?M5!+i=` zdliw+v|ltKb`=H7Zc;7ajJJ|e3?yvfg&5KZTazawTt7$(wpH2~8PFq9LIP3`sTKgl z9F_YCH0_oqTS4ck(nc-pdI>pP4;sDn keypress event. - """ - try: - return self.event_dispatcher.by_position() - except Exception as e: - self.handle_exception(e) - - def handle_double_click(self): - """React to a mouse double click event. - """ - try: - return self.event_dispatcher.by_position() - except Exception as e: - self.handle_exception(e) - - def handle_visual_eval(self): - """React to eval during visual selection. - """ - try: - return self.event_dispatcher.visual_eval() - except Exception as e: - self.handle_exception(e) - - def handle_trace(self,args): - """Evaluate a code snippet specified by args. - """ - try: - return self.runner.trace(args) - except Exception as e: - self.handle_exception(e) - - def handle_eval(self,args): - """Evaluate a code snippet specified by args. - """ - try: - return self.runner.eval(args) - except Exception as e: - self.handle_exception(e) - - def eval_under_cursor(self): - """Evaluate the property under the cursor. - """ - try: - return self.event_dispatcher.eval_under_cursor() - except Exception as e: - self.handle_exception(e) - - def toggle_breakpoint_window(self): - """Open or close the breakpoint window. - """ - try: - return self.runner.toggle_breakpoint_window() - except Exception as e: - self.handle_exception(e) - - def set_breakpoint(self,args = None): - """Set a breakpoint, specified by args. - """ - try: - self.runner.set_breakpoint(args) - except Exception as e: - self.handle_exception(e) - - def remove_breakpoint(self,args = None): - """Remove one or more breakpoints, specified by args. - """ - try: - self.runner.remove_breakpoint(args) - except Exception as e: - self.handle_exception(e) - - def get_context(self): - """Get all the variables in the default context - """ - try: - self.runner.get_context() - except Exception as e: - self.handle_exception(e) - - - def detach(self): - """Detach the debugger, so the script runs to the end. - """ - try: - self.runner.detach() - self.runner.close_connection() - except Exception as e: - self.handle_exception(e) - - def close(self): - """Close the connection, or the UI if already closed. - """ - if self.runner.is_alive(): - self.runner.close_connection() - else: - self.runner.close() - - """ Exception handlers """ - - def handle_timeout(self): - """Handle a timeout, which is pretty normal. - """ - self.runner.close() - self.runner.ui.say("No connection was made") - - def handle_interrupt(self): - """Handle a user interrupt, which is pretty normal. - """ - self.runner.close() - self.runner.ui.say("Connection cancelled") - - def handle_socket_end(self): - """Handle a socket closing, which is pretty normal. - """ - self.runner.ui.say("Connection to the debugger has been closed") - self.runner.close_connection() - - def handle_vim_error(self,e): - """Handle a VIM error. - - This should NOT occur under normal circumstances. - """ - self.runner.ui.error("A Vim error occured: "+\ - str(e)+\ - "\n"+ traceback.format_exc()) - - def handle_readable_error(self,e): - """Simply print an error, since it is human readable enough. - """ - self.runner.ui.error(str(e)) - - def handle_dbgp_error(self,e): - """Simply print an error, since it is human readable enough. - """ - self.runner.ui.error(str(e.args[0])) - - def handle_general_exception(self): - """Handle an unknown error of any kind. - """ - self.runner.ui.error("An error occured: "+\ - str(sys.exc_info()[0])+\ - "\n"+ traceback.format_exc()) - - def handle_exception(self,e): - """Switch on the exception type to work out how to handle it. - """ - if isinstance(e,vdebug.dbgp.TimeoutError): - self.handle_timeout() - elif isinstance(e,vdebug.util.UserInterrupt): - try: - self.handle_interrupt() - except: - pass - elif isinstance(e,vdebug.event.EventError): - self.handle_readable_error(e) - elif isinstance(e,vdebug.breakpoint.BreakpointError): - self.handle_readable_error(e) - elif isinstance(e,vdebug.log.LogError): - self.handle_readable_error(e) - elif isinstance(e,vdebug.dbgp.DBGPError): - self.handle_dbgp_error(e) - elif isinstance(e,(EOFError,socket.error)): - self.handle_socket_end() - elif isinstance(e,KeyboardInterrupt): - print "Keyboard interrupt - debugging session cancelled" - try: - self.runner.close() - except: - pass - else: - self.handle_general_exception() - """ - elif isinstance(e,vim.error): - self.handle_vim_error(e) - """ diff --git a/plugin/python/vdebug/.dbgp.py.un~ b/plugin/python/vdebug/.dbgp.py.un~ deleted file mode 100644 index dd86fca193e8f9c2469170d1ba746ce5f3bf9a1b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3575 zcmeH}zl#$=6vt})s%;Vzwx z9@uDSt^dLKyA!M|ZPZ2)Yq9jldy|FQ#YIXI6U? zZ`^o{plZ3586AnoxWaBbjECBGyGNdI>(- zP^k#lI#UClPG9i;5sBb~i!1Oh6J>b>f6jof&A=}s?}mLDp*if=H%WuN$MMnI(RDj| z`85r#7NDObA}urwRSv~SKwl+EFC8>tYb5(4kQ!80NR{@+U{yfW>-JD`s0eSLhe}XS06)ZZ&=5lbWbU82!kV^Of#nuoezl(Eo`Bwm4TFUZs zfD8Wv5W&pxI)GGt2fd$%F!^(gkJ7UWpqH6arU+2`6^Net(@$?Dm@Rjm`kor9w%;kWvs_&jLHGw{YP#u& zW&f*gPF+`9kA=trdoBAFjo%_s7$E=!RaH|K$}|+h4I_m5>{|X?2r@ldyVP*YW1-CaHJ_ui|n zs=k^HzPgfME`E)6G)Aq>yWhO>*UcY_+duzwXXVdhuRgr@;M?!dJ^K6MFN4RQMN#}g z6h+6BBgHrw7Q-~JH+1V!oDm}(L834>DcX4Qd1HaC%Ten`wnBDPnf$WpFcNPP{R@#> zu@c0C1~#7D`$BNU(LXQY{)dpjD&9a&6vqj=oAy+zmE~F4YSqVSzt=c_=2M}^Q+6U5 zA<65e66hIC_{u@=OQ9DDz4%2yJE%J&nj?;z+M;m&5Unle%)~VJvVN-Cc~|wbyee$9 z%g#q?E6cmZRbUVSx==Xe6{R#di zrFYONQ7sV_ML-e^Tj}(X21sDLSl2?BCy;it9sp7cKE(puS;b|8Xg)xKF?bC?0$X$* z5iny8tY>*F0CY6tr3irEi3cuLp&4OW)X&c7ffpQ*=1oZLvd zn>U8ZCEI|pcXTTqHHXEhY+k49#s`o%W>a|EsxuskIf@%=Isdeq=~9^u(qd9Jb$^pG z>nCsJ!%4YOj?(s^-e~A>z)&Er&psfqtoSl=^dGE=I`Av7rr(`-PSwY6B3(hZ#C~8J zYZce+Su_I^78nwiSl0rm@f#@P)gge?I`NnRq}9*P=#j6@dL-vfNqd+j4D?B-UyRdwLt?mgW_e6rx;ppL>Ixl>>A`#C zg6ao`5a2ud@LaU;cUR->Ec|nG2@?ML&9s|cSZ}IMv99V3CH3|B24SQ7$+@@FCZsKb zp-Xy# z9KG%Z=a~R8fOGWWxoE*HRf8$#G)Cxohqr?>vr@X7OkDK&pcu#*-TBW!ZlCLNZd81} zm`S&jB?SGjT)@7Dvc%C4Gkqfjz=JM8^Txt{32;AMkGnr^xTM3GO$MIGC8+n2A7>>n zqZWJ$n4NH$z2|gBX0l^PZdp%ZYc_8WQk9KWO%HbTHnU*JE4eO7dRRUV^r!>B0(z@6 z^khe!y^`Jv$x&wL<)r~g*W)_A5w7(Tpe*VI_cLnol>^|(8GyDc0(`l`HxHm}tICQG zd0EkpNvFh`y%jJP%LpGrSe5uJfNRa=>LMc7qlPPU`^k&YL 0: - vdebug.log.Log("Registering %i breakpoints with the debugger" % num_bps) - for id, bp in self.breakpoints.iteritems(): - res = self.api.breakpoint_set(bp.get_cmd()) - bp.set_debugger_id(res.get_id()) - - # Update line-based breakpoints with a dict of IDs and lines - def update_lines(self,lines): - for id, line in lines.iteritems(): - try: - self.breakpoints[id].set_line(line) - vdebug.log.Log("Updated line number of breakpoint %s to %s"\ - %(str(id),str(line)) ) - except ValueError: - pass - # No method set_line, not a line breakpoint - - def unlink_api(self): - self.api = None - - def add_breakpoint(self,breakpoint): - vdebug.log.Log("Adding " + str(breakpoint)) - self.breakpoints[str(breakpoint.get_id())] = breakpoint - breakpoint.on_add() - if self.api is not None: - res = self.api.breakpoint_set(breakpoint.get_cmd()) - breakpoint.set_debugger_id(res.get_id()) - - def remove_breakpoint(self,breakpoint): - self.remove_breakpoint_by_id(\ - breakpoint.get_id()) - - def remove_breakpoint_by_id(self,id): - id = str(id) - if id not in self.breakpoints: - raise BreakpointError("No breakpoint matching ID %s" % id) - vdebug.log.Log("Removing breakpoint id %s" % id) - if self.api is not None: - dbg_id = self.breakpoints[id].get_debugger_id() - if dbg_id is not None: - self.api.breakpoint_remove(dbg_id) - self.breakpoints[id].on_remove() - del self.breakpoints[id] - - def clear_breakpoints(self): - for id in self.breakpoints.keys(): - self.remove_breakpoint_by_id(id) - self.breakpoints = {} - - def find_breakpoint(self,file,line): - found = None - for id, bp in self.breakpoints.iteritems(): - if bp.type == "line": - if bp.get_file() == file and\ - bp.get_line() == line: - found = bp.get_id() - break - return found - - def get_sorted_list(self): - keys = self.breakpoints.keys() - keys.sort() - return map(self.breakpoints.get,keys) - -class BreakpointError(Exception): - pass - -class Breakpoint: - """ Abstract factory for creating a breakpoint object. - - Use the class method parse to create a concrete subclass - of a specific type. - """ - type = None - id = 11000 - dbg_id = None - - def __init__(self,ui): - self.id = Breakpoint.id - Breakpoint.id += 1 - self.ui = ui - - def get_id(self): - return self.id - - def set_debugger_id(self,dbg_id): - self.dbg_id = dbg_id - - def get_debugger_id(self): - return self.dbg_id - - def on_add(self): - self.ui.register_breakpoint(self) - - def on_remove(self): - self.ui.remove_breakpoint(self) - - @classmethod - def parse(self,ui,args): - if args is None: - args = "" - args = args.strip() - if len(args) == 0: - """ Line breakpoint """ - row = ui.get_current_row() - try: - file = ui.get_current_file() - line = ui.get_current_line() - if len(line.strip()) == 0: - raise BreakpointError('Cannot set a breakpoint ' +\ - 'on an empty line') - except vdebug.util.FilePathError: - raise BreakpointError('No file, cannot set breakpoint') - return LineBreakpoint(ui,file,row) - else: - arg_parts = args.split(' ') - type = arg_parts.pop(0) - type.lower() - if type == 'conditional': - row = ui.get_current_row() - file = ui.get_current_file() - if len(arg_parts) == 0: - raise BreakpointError("Conditional breakpoints " +\ - "require a condition to be specified") - cond = " ".join(arg_parts) - return ConditionalBreakpoint(ui,file,row,cond) - elif type == 'watch': - if len(arg_parts) == 0: - raise BreakpointError("Watch breakpoints " +\ - "require a condition to be specified") - expr = " ".join(arg_parts) - vdebug.log.Log("Expression: %s"%expr) - return WatchBreakpoint(ui,expr) - elif type == 'exception': - if len(arg_parts) == 0: - raise BreakpointError("Exception breakpoints " +\ - "require an exception name to be specified") - return ExceptionBreakpoint(ui,arg_parts[0]) - elif type == 'return': - l = len(arg_parts) - if l == 0: - raise BreakpointError("Return breakpoints " +\ - "require a function name to be specified") - return ReturnBreakpoint(ui,arg_parts[0]) - elif type == 'call': - l = len(arg_parts) - if l == 0: - raise BreakpointError("Call breakpoints " +\ - "require a function name to be specified") - return CallBreakpoint(ui,arg_parts[0]) - else: - raise BreakpointError("Unknown breakpoint type, " +\ - "please choose one of: conditional, exception,"+\ - "call or return") - - def get_cmd(self): - pass - - def __str__(self): - return "%s breakpoint, id %i" %(self.type,self.id) - -class LineBreakpoint(Breakpoint): - type = "line" - - def __init__(self,ui,file,line): - Breakpoint.__init__(self,ui) - self.file = file - self.line = line - - def get_line(self): - return self.line - - def set_line(self,line): - self.line = int(line) - - def get_file(self): - return self.file - - def get_cmd(self): - cmd = "-t " + self.type - cmd += " -f " + self.file.as_remote() - cmd += " -n " + str(self.line) - cmd += " -s enabled" - - return cmd - -class TemporaryLineBreakpoint(LineBreakpoint): - def on_add(self): - pass - - def on_remove(self): - pass - - def get_cmd(self): - cmd = LineBreakpoint.get_cmd(self) - return cmd + " -r 1" - -class ConditionalBreakpoint(LineBreakpoint): - type = "conditional" - - def __init__(self,ui,file,line,condition): - LineBreakpoint.__init__(self,ui,file,line) - self.condition = condition - - def get_cmd(self): - cmd = LineBreakpoint.get_cmd(self) - cmd += " -- " + base64.encodestring(self.condition) - return cmd - -class WatchBreakpoint(Breakpoint): - type = "watch" - - def __init__(self,ui,expr): - Breakpoint.__init__(self,ui) - self.expr = expr - - def get_cmd(self): - cmd = "-t " + self.type - cmd += " -- " + base64.encodestring(self.expr) - return cmd - - -class ExceptionBreakpoint(Breakpoint): - type = "exception" - - def __init__(self,ui,exception): - Breakpoint.__init__(self,ui) - self.exception = exception - - def get_cmd(self): - cmd = "-t " + self.type - cmd += " -x " + self.exception - cmd += " -s enabled" - return cmd - -class CallBreakpoint(Breakpoint): - type = "call" - - def __init__(self,ui,function): - Breakpoint.__init__(self,ui) - self.function = function - - def get_cmd(self): - cmd = "-t " + self.type - cmd += " -m %s" % self.function - cmd += " -s enabled" - return cmd - -class ReturnBreakpoint(CallBreakpoint): - type = "return" diff --git a/plugin/python/vdebug/dbgp.py b/plugin/python/vdebug/dbgp.py deleted file mode 100644 index 08dc9ab6..00000000 --- a/plugin/python/vdebug/dbgp.py +++ /dev/null @@ -1,709 +0,0 @@ -import xml.etree.ElementTree as ET -import socket -import vdebug.log -import base64 -import time - -""" Response objects for the DBGP module.""" - -class Response: - """Contains response data from a command made to the debugger.""" - ns = '{urn:debugger_protocol_v1}' - - def __init__(self,response,cmd,cmd_args,api): - self.response = response - self.cmd = cmd - self.cmd_args = cmd_args - self.xml = None - self.api = api - if " 0: - send += ' ' + args - vdebug.log.Log("Command: "+send,\ - vdebug.log.Logger.DEBUG) - self.conn.send_msg(send) - msg = self.conn.recv_msg() - vdebug.log.Log("Response: "+msg,\ - vdebug.log.Logger.DEBUG) - return res_cls(msg,cmd,args,self) - - def status(self): - """Get the debugger status. - - Returns a Response object. - """ - return self.send_cmd('status','',StatusResponse) - - def feature_get(self,name): - """Get the value of a feature from the debugger. - - See the DBGP documentation for a list of features. - - Returns a FeatureGetResponse object. - - name -- name of the feature, e.g. encoding - """ - return self.send_cmd( - 'feature_get', - '-n '+str(name), - FeatureGetResponse) - - def feature_set(self,name,value): - """Set the value of a debugger feature. - - See the DBGP documentation for a list of features. - - Returns a Response object. - - name -- name of the feature, e.g. encoding - value -- new value for the feature - """ - return self.send_cmd( - 'feature_set', - '-n ' + str(name) + ' -v ' + str(value)) - - def run(self): - """Tell the debugger to start or resume - execution.""" - return self.send_cmd('run','',StatusResponse) - - def eval(self,code): - """Tell the debugger to start or resume - execution.""" - code_enc = base64.encodestring(code) - args = '-- %s' % code_enc - - """ The python engine incorrectly requires length. - if self.language == 'python': - args = ("-l %i " % len(code_enc) ) + args""" - - return self.send_cmd('eval',args,EvalResponse) - - def step_into(self): - """Tell the debugger to step to the next - statement. - - If there's a function call, the debugger engine - will break on the first statement in the function. - """ - return self.send_cmd('step_into','',StatusResponse) - - def step_over(self): - """Tell the debugger to step to the next - statement. - - If there's a function call, the debugger engine - will stop at the next statement after the function call. - """ - return self.send_cmd('step_over','',StatusResponse) - - def step_out(self): - """Tell the debugger to step out of the statement. - - The debugger will step out of the current scope. - """ - return self.send_cmd('step_out','',StatusResponse) - - def stop(self): - """Tell the debugger to stop execution. - - The script is terminated immediately.""" - return self.send_cmd('stop','',StatusResponse) - - def stack_get(self): - """Get the stack information. - """ - return self.send_cmd('stack_get','',StackGetResponse) - - def context_get(self,context = 0): - """Get the context variables. - """ - return self.send_cmd('context_get',\ - '-c %i' % int(context),\ - ContextGetResponse) - - def context_names(self): - """Get the context types. - """ - return self.send_cmd('context_names','',ContextNamesResponse) - - def property_get(self,name): - """Get a property. - """ - return self.send_cmd('property_get','-n %s -d 0' % name,ContextGetResponse) - - def detach(self): - """Tell the debugger to detach itself from this - client. - - The script is not terminated, but runs as normal - from this point.""" - ret = self.send_cmd('detach','',StatusResponse) - self.conn.close() - return ret - - def breakpoint_set(self,cmd_args): - """Set a breakpoint. - - The breakpoint type is defined by the arguments, see the - Breakpoint class for more detail.""" - return self.send_cmd('breakpoint_set',cmd_args,\ - BreakpointSetResponse) - - def breakpoint_list(self): - return self.send_cmd('breakpoint_list') - - def breakpoint_remove(self,id): - """Remove a breakpoint by ID. - - The ID is that returned in the response from breakpoint_set.""" - return self.send_cmd('breakpoint_remove','-d %i' % id,Response) - -"""Connection module for managing a socket connection -between this client and the debugger.""" - -class Connection: - """DBGP connection class, for managing the connection to the debugger. - - The host, port and socket timeout are configurable on object construction. - """ - - sock = None - address = None - isconned = 0 - - def __init__(self, host = '', port = 9000, timeout = 30, input_stream = None, pydbgp=None): - """Create a new Connection. - - The connection is not established until open() is called. - - host -- host name where debugger is running (default '') - port -- port number which debugger is listening on (default 9000) - timeout -- time in seconds to wait for a debugger connection before giving up (default 30) - input_stream -- object for checking input stream and user interrupts (default None) - """ - self.port = port - self.host = host - self.timeout = timeout - self.input_stream = input_stream - self.pydbgp = pydbgp - - def __del__(self): - """Make sure the connection is closed.""" - self.close() - - def isconnected(self): - """Whether the connection has been established.""" - return self.isconned - - def open(self): - """Listen for a connection from the debugger. Listening for the actual - connection is handled by self.listen().""" - print 'Waiting for a connection (Ctrl-C to cancel, this message will self-destruct in ',self.timeout,' seconds...)' - serv = socket.socket(socket.AF_INET, socket.SOCK_STREAM) - try: - serv.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) - serv.setblocking(0) - serv.bind((self.host, self.port)) - serv.listen(5) - (self.sock, self.address) = self.listen(serv, self.timeout) - self.sock.settimeout(None) - except socket.timeout: - serv.close() - raise TimeoutError("Timeout waiting for connection") - except: - serv.close() - raise - - self.isconned = 1 - serv.close() - - def listen(self, serv, timeout): - """Non-blocking listener. Provides support for keyboard interrupts from - the user. Although it's non-blocking, the user interface will still - block until the timeout is reached. - - serv -- Socket server to listen to. - timeout -- Seconds before timeout. - """ - start = time.time() - while True: - if (time.time() - start) > timeout: - raise socket.timeout - try: - """Check for user interrupts""" - if self.input_stream is not None: - self.input_stream.probe() - time.sleep(1) - return serv.accept() - except socket.error: - pass - - def close(self): - """Close the connection.""" - if self.sock != None: - vdebug.log.Log("Closing the socket",\ - vdebug.log.Logger.DEBUG) - self.sock.close() - self.sock = None - self.isconned = 0 - - def __recv_length(self): - """Get the length of the proceeding message.""" - length = '' - while 1: - c = self.sock.recv(1) - if c == '': - self.close() - raise EOFError('Socket Closed') - if c == '\0': - return int(length) - if c.isdigit(): - length = length + c - - def __recv_null(self): - """Receive a null byte.""" - while 1: - c = self.sock.recv(1) - if c == '': - self.close() - raise EOFError('Socket Closed') - if c == '\0': - return - - def __recv_body(self, to_recv): - """Receive a message of a given length. - - to_recv -- length of the message to receive - """ - body = '' - while to_recv > 0: - buf = self.sock.recv(to_recv) - if buf == '': - self.close() - raise EOFError('Socket Closed') - to_recv -= len(buf) - body = body + buf - return body - - def recv_msg(self): - """Receive a message from the debugger. - - Returns a string, which is expected to be XML. - """ - length = self.__recv_length() - body = self.__recv_body(length) - self.__recv_null() - return body - - def send_msg(self, cmd): - """Send a message to the debugger. - - cmd -- command to send - """ - self.sock.send(cmd + '\0') - -class ContextProperty: - - ns = '{urn:debugger_protocol_v1}' - - def __init__(self,node,parent = None,depth = 0): - self.parent = parent - self.__determine_type(node) - self._determine_displayname(node) - self.encoding = node.get('encoding') - self.depth = depth - - self.size = node.get('size') - self.value = "" - self.is_last_child = False - - self._determine_children(node) - self.__determine_value(node) - self.__init_children(node) - if self.type == 'scalar': - self.size = len(self.value) - 2 - - def __determine_value(self,node): - if self.has_children: - self.value = "" - return - - self.value = self._get_enc_node_text(node,'value') - if self.value is None: - if self.encoding == 'base64': - if node.text is None: - self.value = "" - else: - self.value = base64.decodestring(node.text) - elif not self.is_uninitialized() \ - and not self.has_children: - self.value = node.text - - if self.value is None: - self.value = "" - - self.num_crs = self.value.count('\n') - if self.type.lower() in ("string","str","scalar"): - self.value = '`%s`' % self.value.replace('`','\\`') - - def __determine_type(self,node): - type = node.get('classname') - if type is None: - type = node.get('type') - if type is None: - type = 'unknown' - self.type = type - - def _determine_displayname(self,node): - display_name = node.get('fullname') - if display_name == None: - display_name = self._get_enc_node_text(node,'fullname',"") - if display_name == '::': - display_name = self.type - self.display_name = display_name - - def _get_enc_node_text(self,node,name,default = - None): - n = node.find('%s%s' %(self.ns, name)) - if n is not None and n.text is not None: - if n.get('encoding') == 'base64': - val = base64.decodestring(n.text) - else: - val = n.text - else: - val = None - if val is None: - return default - else: - return val - - def _determine_children(self,node): - children = node.get('numchildren') - if children is None: - children = node.get('children') - if children is None: - children = 0 - else: - children = int(children) - self.num_declared_children = children - self.has_children = True if children > 0 else False - self.children = [] - - def __init_children(self,node): - if self.has_children: - idx = 0 - tagname = '%sproperty' % self.ns - children = list(node) - if children is not None: - for c in children: - if c.tag == tagname: - idx += 1 - p = self._create_child(c,self,self.depth+1) - self.children.append(p) - if idx == self.num_declared_children: - p.mark_as_last_child() - - def _create_child(self,node,parent,depth): - return ContextProperty(node,parent,depth) - - def mark_as_last_child(self): - self.is_last_child = True - - def is_uninitialized(self): - if self.type == 'uninitialized': - return True - else: - return False - - def child_count(self): - return len(self.children) - - def type_and_size(self): - size = None - if self.has_children: - size = self.num_declared_children - elif self.size is not None: - size = self.size - - if size is None: - return self.type - else: - return "%s [%s]" %(self.type,size) - -class EvalProperty(ContextProperty): - def __init__(self,node,code,language,parent=None,depth=0): - self.code = code - self.language = language.lower() - if parent is None: - self.is_parent = True - else: - self.is_parent = False - ContextProperty.__init__(self,node,parent,depth) - - def _create_child(self,node,parent,depth): - return EvalProperty(node,self.code,self.language,parent,depth) - - def _determine_displayname(self,node): - if self.is_parent: - self.display_name = self.code - else: - if self.language == 'php' or \ - self.language == 'perl': - if self.parent.type == 'array': - self.display_name = self.parent.display_name + \ - "['%s']" % node.get('name') - else: - self.display_name = self.parent.display_name + \ - "->"+node.get('name') - else: - name = node.get('name') - if name is None: - name = "?" - name = self._get_enc_node_text(node,'name','?') - if self.parent.type == 'list': - self.display_name = self.parent.display_name + name - else: - self.display_name = self.parent.display_name + \ - "." + name - - -""" Errors/Exceptions """ -class TimeoutError(Exception): - pass - -class DBGPError(Exception): - """Raised when the debugger returns an error message.""" - pass - -class CmdNotImplementedError(Exception): - """Raised when the debugger returns an error message.""" - pass - -class EvalError(Exception): - """Raised when some evaluated code is invalid.""" - pass - -class TraceError(Exception): - """Raised when trace is out of domain.""" - pass - -class ResponseError(Exception): - """An error caused by an unexpected response from the - debugger (e.g. invalid format XML).""" - pass diff --git a/plugin/python/vdebug/event.py b/plugin/python/vdebug/event.py deleted file mode 100644 index 81d3bbb0..00000000 --- a/plugin/python/vdebug/event.py +++ /dev/null @@ -1,268 +0,0 @@ -# coding=utf-8 -import vdebug.log -import vdebug.opts -import vim -import re - -class Dispatcher: - def __init__(self,runner): - self.runner = runner - - def visual_eval(self): - if self.runner.is_alive(): - event = VisualEvalEvent() - return event.execute(self.runner) - - def eval_under_cursor(self): - if self.runner.is_alive(): - event = CursorEvalEvent() - return event.execute(self.runner) - - def by_position(self): - if self.runner.is_alive(): - event = self._get_event_by_position() - if event is not None: - return event.execute(self.runner) - else: - vdebug.log.Log("No executable event found at current cursor position",\ - vdebug.log.Logger.DEBUG) - return False - - def _get_event_by_position(self): - buf_name = vim.current.buffer.name - p = re.compile('.*[\\\/]([^\\\/]+)') - m = p.match(buf_name) - if m is None: - return None - - window_name = m.group(1) - if window_name == self.runner.ui.watchwin.name: - lineno = vim.current.window.cursor[0] - vdebug.log.Log("User action in watch window, line %s" % lineno,\ - vdebug.log.Logger.DEBUG) - line = self.runner.ui.watchwin.buffer[lineno-1].strip() - if lineno == 1: - return WatchWindowContextChangeEvent() - elif line.startswith(vdebug.opts.Options.get('marker_closed_tree')): - return WatchWindowPropertyGetEvent() - elif line.startswith(vdebug.opts.Options.get('marker_open_tree')): - return WatchWindowHideEvent() - elif window_name == self.runner.ui.stackwin.name: - return StackWindowLineSelectEvent() - -class Event: - """Base event class. - """ - def execute(self,runner): - pass - -class VisualEvalEvent(Event): - """Evaluate a block of code given by visual selection in Vim. - """ - def execute(self,runner): - selection = vim.eval("Vdebug_get_visual_selection()") - runner.eval(selection) - return True - -class CursorEvalEvent(Event): - """Evaluate the variable currently under the cursor. - """ - char_regex = { - "default" : "a-zA-Z0-9_.\[\]'\"", - "ruby" : "$@a-zA-Z0-9_.\[\]'\"", - "perl" : "$a-zA-Z0-9_{}'\"", - "php" : "$@%a-zA-Z0-9_\[\]'\"\->" - } - - var_regex = { - "default" : "^[a-zA-Z_]", - "ruby" : "^[$@a-zA-Z_]", - "php" : "^[\$A-Z]", - "perl" : "^[$@%]" - } - - def execute(self,runner): - lineno = vim.current.window.cursor[0] - colno = vim.current.window.cursor[1] - line = vim.current.buffer[lineno-1] - lang = runner.api.language - if lang in self.char_regex: - reg = self.char_regex[lang] - else: - reg = self.char_regex['default'] - - p = re.compile('['+reg+']') - var = "" - linelen = len(line) - - for i in range(colno,linelen): - char = line[i] - if p.match(char): - var += char - else: - break - - if colno > 0: - for i in range(colno-1,-1,-1): - char = line[i] - if p.match(char): - var = char + var - else: - break - - if lang in self.var_regex: - reg = self.var_regex[lang] - else: - reg = self.var_regex["default"] - - f = re.compile(reg) - if f.match(var) is None: - runner.ui.error("Cannot find a valid variable under the cursor") - return False - - if len(var): - runner.eval(var) - return True - else: - runner.ui.error("Cannot find a valid variable under the cursor") - return False - -class StackWindowLineSelectEvent(Event): - """Move the the currently selected file and line in the stack window - """ - def execute(self,runner): - lineno = vim.current.window.cursor[0] - - vdebug.log.Log("User action in stack window, line %s" % lineno,\ - vdebug.log.Logger.DEBUG) - line = runner.ui.stackwin.buffer[lineno-1] - if line.find(" @ ") == -1: - return False - filename_pos = line.find(" @ ") + 3 - file_and_line = line[filename_pos:] - line_pos = file_and_line.rfind(":") - file = vdebug.util.LocalFilePath(file_and_line[:line_pos]) - lineno = file_and_line[line_pos+1:] - runner.ui.sourcewin.set_file(file) - runner.ui.sourcewin.set_line(lineno) - -class WatchWindowPropertyGetEvent(Event): - """Open a tree node in the watch window. - - This retrieves the child nodes and displays them underneath. - """ - def execute(self,runner): - lineno = vim.current.window.cursor[0] - line = vim.current.buffer[lineno-1] - pointer_index = line.find(vdebug.opts.Options.get('marker_closed_tree')) - step = len(vdebug.opts.Options.get('marker_closed_tree')) + 1 - - eq_index = line.find('=') - if eq_index == -1: - raise EventError("Cannot read the selected property") - - name = line[pointer_index+step:eq_index-1] - context_res = runner.api.property_get(name) - rend = vdebug.ui.vimui.ContextGetResponseRenderer(context_res) - output = rend.render(pointer_index - 1) - if vdebug.opts.Options.get('watch_window_style') == 'expanded': - runner.ui.watchwin.delete(lineno,lineno+1) - runner.ui.watchwin.insert(output.rstrip(),lineno-1,True) - -class WatchWindowHideEvent(Event): - """Close a tree node in the watch window. - """ - def execute(self,runner): - lineno = vim.current.window.cursor[0] - line = vim.current.buffer[lineno-1] - pointer_index = line.find(vdebug.opts.Options.get('marker_open_tree')) - - buf_len = len(vim.current.buffer) - end_lineno = buf_len - 1 - for i in range(lineno,end_lineno): - buf_line = vim.current.buffer[i] - char = buf_line[pointer_index] - if char != " ": - end_lineno = i - 1 - break - runner.ui.watchwin.delete(lineno,end_lineno+1) - if vdebug.opts.Options.get('watch_window_style') == 'expanded': - append = "\n" + "".rjust(pointer_index) + "|" - else: - append = "" - runner.ui.watchwin.insert(line.replace(\ - vdebug.opts.Options.get('marker_open_tree'),\ - vdebug.opts.Options.get('marker_closed_tree'),1) + \ - append,lineno-1,True) - -class WatchWindowContextChangeEvent(Event): - """Event used to trigger a watch window context change. - - The word under the VIM cursor is retrieved, and context_get called with the - new context name. - """ - - def execute(self,runner): - column = vim.current.window.cursor[1] - line = vim.current.buffer[0] - - vdebug.log.Log("Finding context name at column %s" % column,\ - vdebug.log.Logger.DEBUG) - - tab_end_pos = self.__get_word_end(line,column) - tab_start_pos = self.__get_word_start(line,column) - - if tab_end_pos == -1 or \ - tab_start_pos == -1: - raise EventError("Failed to find context name under cursor") - - context_name = line[tab_start_pos:tab_end_pos] - vdebug.log.Log("Context name: %s" % context_name,\ - vdebug.log.Logger.DEBUG) - if context_name[0] == '*': - runner.ui.say("This context is already showing") - return False - - context_id = self.__determine_context_id(\ - runner.context_names,context_name) - - if context_id == -1: - raise EventError("Could not resolve context name") - return False - else: - runner.get_context(context_id) - return True - - def __get_word_end(self,line,column): - tab_end_pos = -1 - line_len = len(line) - i = column - while i < line_len: - if line[i] == ']': - tab_end_pos = i-1 - break - i += 1 - return tab_end_pos - - def __get_word_start(self,line,column): - tab_start_pos = -1 - j = column - while j >= 0: - if line[j] == '[': - tab_start_pos = j+2 - break - j -= 1 - return tab_start_pos - - def __determine_context_id(self,context_names,context_name): - found_id = -1 - for id in context_names.keys(): - name = context_names[id] - vdebug.log.Log(name +", "+context_name) - if name == context_name: - found_id = id - break - return found_id - -class EventError(Exception): - pass diff --git a/plugin/python/vdebug/log.py b/plugin/python/vdebug/log.py deleted file mode 100644 index beb9a2ac..00000000 --- a/plugin/python/vdebug/log.py +++ /dev/null @@ -1,131 +0,0 @@ -import time -import sys -import os - -class Logger: - """ Abstract class for all logger implementations. - - Concrete classes will log messages using various methods, - e.g. write to a file. - """ - - (ERROR,INFO,DEBUG) = (0,1,2) - TYPES = ("ERROR","Info","Debug") - debug_level = ERROR - - def __init__(self,debug_level): - pass - - def log(self, string, level): - """ Log a message """ - pass - - def shutdown(self): - """ Action to perform when closing the logger """ - pass - - def time(self): - """ Get a nicely formatted time string """ - return time.strftime("%a %d %Y %H:%M:%S", \ - time.localtime()) - - def format(self,string,level): - display_level = self.TYPES[level] - """ Format the error message in a standard way """ - return "- [%s] {%s} %s" %(display_level, self.time(), str(string)) - - -class WindowLogger(Logger): - """ Log messages to a window. - - The window object is passed in on construction, but - only created if a message is written. - """ - def __init__(self,debug_level,window): - self.window = window - self.debug_level = int(debug_level) - - def shutdown(self): - if self.window is not None: - self.window.destroy() - - def log(self, string, level): - if level > self.debug_level: - return - if not self.window.is_open: - self.window.create() - self.window.write(\ - self.format(string,level)+"\n") - - -class FileLogger(Logger): - """ Log messages to a window. - - The window object is passed in on construction, but - only created if a message is written. - """ - def __init__(self,debug_level,filename): - self.filename = os.path.expanduser(filename) - self.f = None - self.debug_level = int(debug_level) - - def __open(self): - try: - self.f = open(self.filename,'w') - except IOError as e: - raise LogError("Invalid file name '%s' for log file: %s" \ - %(self.filename,str(e))) - except: - raise LogError("Error using file '%s' as a log file: %s" \ - %(self.filename,sys.exc_info()[0])) - - - def shutdown(self): - if self.f is not None: - self.f.close() - - def log(self, string, level): - if level > self.debug_level: - return - if self.f is None: - self.__open() - self.f.write(\ - self.format(string,level)+"\n") - self.f.flush() - -class Log: - - loggers = {} - - def __init__(self,string,level = Logger.INFO): - Log.log(string,level) - - @classmethod - def log(cls, string, level = Logger.INFO): - for k, l in cls.loggers.iteritems(): - l.log(string,level) - - @classmethod - def set_logger(cls, logger): - k = logger.__class__.__name__ - if k in cls.loggers: - cls.loggers[k].shutdown() - cls.loggers[k] = logger - - @classmethod - def remove_logger(cls, type): - if type in cls.loggers.iteritems(): - cls.loggers[type].shutdown() - del cls.loggers[type] - return True - return False - - @classmethod - def shutdown(cls): - for k, l in cls.loggers.iteritems(): - l.shutdown() - cls.loggers = {} - -class LogError(Exception): - pass - diff --git a/plugin/python/vdebug/opts.py b/plugin/python/vdebug/opts.py deleted file mode 100644 index 0a22cd0d..00000000 --- a/plugin/python/vdebug/opts.py +++ /dev/null @@ -1,55 +0,0 @@ - -class Options: - instance = None - - def __init__(self,options): - self.options = options - - @classmethod - def set(cls,options): - """Create an Options instance with the provided dictionary of - options""" - cls.instance = Options(options) - - @classmethod - def inst(cls): - """Get the Options instance. - """ - if cls.instance is None: - raise OptionsError("No options have been set") - return cls.instance - - @classmethod - def get(cls,name,as_type = str): - """Get an option by name. - - Raises an OptionsError if the option doesn't exist. - """ - inst = cls.inst() - if name in inst.options: - return as_type(inst.options[name]) - else: - raise OptionsError("No option with key '%s'" % name) - - @classmethod - def overwrite(cls,name,value): - inst = cls.inst() - inst.options[name] = value - - @classmethod - def isset(cls,name): - """Checks whether the option exists and is set. - - By set, it means whether the option has length. All the option - values are strings. - """ - inst = cls.inst() - if name in inst.options and \ - len(inst.options[name]) > 0: - return True - else: - return False - -class OptionsError(Exception): - pass - diff --git a/plugin/python/vdebug/runner.py b/plugin/python/vdebug/runner.py deleted file mode 100644 index cf2ea76a..00000000 --- a/plugin/python/vdebug/runner.py +++ /dev/null @@ -1,381 +0,0 @@ -# coding=utf-8 - -import vdebug.dbgp -import vdebug.log -import vdebug.ui.vimui -import socket -import vim -import vdebug.breakpoint -import vdebug.opts -import vdebug.util - -class Runner: - """ Class that stitches together all the debugger components. - - This instantiates the connection and debugger vdebug.ui, and provides - an interface that Vim can use to send commands. - """ - - prev_trace_code_value = '' - def __init__(self,pydbgp=None): - self.api = None - vdebug.opts.Options.set(vim.eval('g:vdebug_options')) - self.breakpoints = vdebug.breakpoint.Store() - self.keymapper = vdebug.util.Keymapper() - self.ui = vdebug.ui.vimui.Ui(self.breakpoints) - self.pydbgp = pydbgp - - def open(self): - """ Open the connection and debugging vdebug.ui. - - If either of these are already open, the current - connection or vdebug.ui is used. - """ - try: - if self.ui.is_modified(): - self.ui.error("Modified buffers must be saved before debugging") - return - vdebug.opts.Options.set(vim.eval('g:vdebug_options')) - - if vdebug.opts.Options.isset('debug_file'): - vdebug.log.Log.set_logger(vdebug.log.FileLogger(\ - vdebug.opts.Options.get('debug_file_level'),\ - vdebug.opts.Options.get('debug_file'))) - self.listen(\ - vdebug.opts.Options.get('server'),\ - vdebug.opts.Options.get('port',int),\ - vdebug.opts.Options.get('timeout',int)) - - self.ui.open() - self.keymapper.map() - self.ui.set_listener_details(\ - vdebug.opts.Options.get('server'),\ - vdebug.opts.Options.get('port'),\ - vdebug.opts.Options.get('ide_key')) - - addr = self.api.conn.address - vdebug.log.Log("Found connection from " + str(addr),vdebug.log.Logger.INFO) - self.ui.set_conn_details(addr[0],addr[1]) - - self.set_features() - self.breakpoints.update_lines(self.ui.get_breakpoint_sign_positions()) - self.breakpoints.link_api(self.api) - - cn_res = self.api.context_names() - self.context_names = cn_res.names() - vdebug.log.Log("Available context names: %s" %\ - str(self.context_names),vdebug.log.Logger.DEBUG) - - if vdebug.opts.Options.get('break_on_open',int) == 1: - status = self.api.step_into() - else: - status = self.api.run() - self.refresh(status) - except Exception: - self.close() - raise - - def set_features(self): - """Evaluate vim dictionary of features and pass to debugger. - - Errors are caught if the debugger doesn't like the feature name or - value. This doesn't break the loop, so multiple features can be set - even in the case of an error.""" - features = vim.eval('g:vdebug_features') - for name, value in features.iteritems(): - try: - self.api.feature_set(name, value) - except vdebug.dbgp.DBGPError as e: - error_str = "Failed to set feature %s: %s" %(name,str(e.args[0])) - self.ui.error(error_str) - - def refresh(self,status): - """The main action performed after a deubugger step. - - Updates the status window, current stack, source - file and line and watch window.""" - if not self.is_alive(): - self.ui.error("Cannot update: no connection") - else: - - if str(status) == "interactive": - self.ui.error("Debugger engine says it is in interactive mode,"+\ - "which is not supported: closing connection") - self.close_connection() - elif str(status) in ("stopping","stopped"): - self.ui.statuswin.set_status("stopped") - self.ui.say("Debugging session has ended") - self.close_connection(False) - if vdebug.opts.Options.get('continuous_mode', int) != 0: - self.open() - return - else: - vdebug.log.Log("Getting stack information") - self.ui.statuswin.set_status(status) - stack_res = self.update_stack() - stack = stack_res.get_stack() - - self.cur_file = vdebug.util.RemoteFilePath(stack[0].get('filename')) - self.cur_lineno = stack[0].get('lineno') - - vdebug.log.Log("Moving to current position in source window") - self.ui.set_source_position(\ - self.cur_file,\ - self.cur_lineno) - - self.get_context(0) - - def get_context(self,context_id = 0): - self.ui.watchwin.clean() - self.ui.tracewin.clean() - name = self.context_names[context_id] - vdebug.log.Log("Getting %s variables" % name) - context_res = self.api.context_get(context_id) - rend = vdebug.ui.vimui.ContextGetResponseRenderer(\ - context_res,"%s at %s:%s" \ - %(name,self.ui.sourcewin.file,self.cur_lineno),\ - self.context_names, context_id) - self.ui.watchwin.accept_renderer(rend) - - try: - if self.ui.tracewin.reserve_trace_code: - context_res = self.api.eval(self.ui.tracewin.reserve_trace_code) - rend = vdebug.ui.vimui.ContextGetResponseRenderer(\ - context_res,"Trace of: '%s'" \ - %context_res.get_code()) - rendered = rend.render() - self.ui.tracewin.accept_value(rendered) - self.ui.tracewin.last_context_rendered = rendered - except vdebug.dbgp.EvalError: - if self.ui.tracewin.last_context_rendered: - self.ui.tracewin.accept_value('(prev)'+str(self.ui.tracewin.last_context_rendered)) - else: - self.ui.tracewin.accept_value(str(self.ui.tracewin.reserve_trace_code)) - - - - def toggle_breakpoint_window(self): - """Open or close the breakpoint window. - - The window appears as a horizontal split below the - currently selected window.""" - if self.ui.breakpointwin.is_open: - self.ui.breakpointwin.destroy() - else: - self.ui.breakpointwin.create() - - def is_alive(self): - """Whether the connection is open.""" - if self.api is not None and \ - self.api.conn.isconnected(): - return True - return False - - def run(self): - """Tell the debugger to run. - - It will run until the end of the execution or until a - breakpoint is reached.""" - if not self.is_alive(): - self.open() - else: - vdebug.log.Log("Running") - self.ui.statuswin.set_status("running") - res = self.api.run() - self.refresh(res) - - def step_over(self): - """Step over to the next statement.""" - if not self.is_alive(): - self.open() - else: - vdebug.log.Log("Stepping over") - self.ui.statuswin.set_status("running") - res = self.api.step_over() - self.refresh(res) - - def step_into(self): - """Step into the next statement.""" - if not self.is_alive(): - self.open() - else: - vdebug.log.Log("Stepping into statement") - self.ui.statuswin.set_status("running") - res = self.api.step_into() - self.refresh(res) - - def step_out(self): - """Step out of the current context.""" - if not self.is_alive(): - self.open() - else: - vdebug.log.Log("Stepping out of statement") - self.ui.statuswin.set_status("running") - res = self.api.step_out() - self.refresh(res) - - def remove_breakpoint(self,args): - """Remove a breakpoint, by ID or "*".""" - if args is None: - args = "" - args = args.strip() - if len(args) == 0: - self.ui.error("ID or '*' required to remove a breakpoint: run "+\ - "':breakpointWindow' to see breakpoints and their IDs") - return - - if args == '*': - self.breakpoints.clear_breakpoints() - else: - arg_parts = args.split(" ") - for id in arg_parts: - self.breakpoints.remove_breakpoint_by_id(id) - - def set_breakpoint(self,args): - bp = vdebug.breakpoint.Breakpoint.parse(self.ui,args) - if bp.type == "line": - id = self.breakpoints.find_breakpoint(\ - bp.get_file(),\ - bp.get_line()) - if id is not None: - self.breakpoints.remove_breakpoint_by_id(id) - return - self.breakpoints.add_breakpoint(bp) - - def trace(self,code): - """Evaluate a snippet of code and show the response on the watch window. - """ - self.ui.tracewin.clean() - try: - vdebug.log.Log("Tracing code: "+code) - context_res = self.api.eval(code) - rend = vdebug.ui.vimui.ContextGetResponseRenderer(\ - context_res,"Eval of: '%s'" \ - %context_res.get_code()) - self.ui.tracewin.accept_renderer(rend) - except vdebug.dbgp.EvalError: - self.ui.tracewin.accept_value('(not invalid)') - self.ui.tracewin.reserve_trace_code = code - - def eval(self,code): - """Evaluate a snippet of code and show the response on the watch window. - """ - try: - vdebug.log.Log("Evaluating code: "+code) - context_res = self.api.eval(code) - rend = vdebug.ui.vimui.ContextGetResponseRenderer(\ - context_res,"Eval of: '%s'" \ - %context_res.get_code()) - self.ui.watchwin.clean() - self.ui.watchwin.accept_renderer(rend) - except vdebug.dbgp.EvalError: - self.ui.error("Failed to evaluate invalid code, '%s'" % code) - - def run_to_cursor(self): - """Tell the debugger to run to the current cursor position. - - This fails if the current window is not the source window. - """ - row = self.ui.get_current_row() - file = self.ui.get_current_file() - vdebug.log.Log(file) - vdebug.log.Log(self.ui.sourcewin.get_file()) - if file != self.ui.sourcewin.get_file(): - self.ui.error("Run to cursor only works in the source window!") - return - vdebug.log.Log("Running to position: line %s of %s" %(row,file)) - bp = vdebug.breakpoint.TemporaryLineBreakpoint(self.ui,file,row) - self.api.breakpoint_set(bp.get_cmd()) - self.run() - - def listen(self,server,port,timeout): - """Open the vdebug.dbgp API with connection. - - Uses existing connection if possible. - """ - if self.is_alive(): - vdebug.log.Log("Cannot open a new connection \ - while one already exists",\ - vdebug.log.Logger.ERROR) - return - else: - while True: - ide_key = vdebug.opts.Options.get('ide_key') - check_ide_key = True - if len(ide_key) == 0: - check_ide_key = False - - connection = vdebug.dbgp.Connection(server,port,\ - timeout,vdebug.util.InputStream(pydbgp=self.pydbgp)) - - self.api = vdebug.dbgp.Api(connection) - if check_ide_key and ide_key != self.api.idekey: - print "Ignoring debugger connection with IDE key '%s'" \ - % self.api.idekey - self.api.detach() - else: - break - - def update_stack(self): - """Update the stack window with the current stack info. - """ - if not self.is_alive(): - self.ui.error("Cannot update the stack: no debugger connection") - else: - self.ui.stackwin.clean() - res = self.api.stack_get() - renderer = vdebug.ui.vimui.StackGetResponseRenderer(res) - self.ui.stackwin.accept_renderer(renderer) - return res - - def detach(self): - """Detach the debugger engine, and allow it to continue execution. - """ - if not self.is_alive(): - self.ui.error("Cannot detach: no debugger connection") - else: - self.ui.say("Detaching the debugger") - self.api.detach() - - def close_connection(self,stop = True): - """ Close the connection to the debugger. - """ - self.breakpoints.unlink_api() - self.ui.mark_as_stopped() - try: - if self.is_alive(): - vdebug.log.Log("Closing the connection") - if stop: - if vdebug.opts.Options.get('on_close') == 'detach': - try: - self.api.detach() - except vdebug.dbgp.CmdNotImplementedError: - self.ui.error('Detach is not supported by the debugger, stopping instead') - vdebug.opts.Options.overwrite('on_close','stop') - self.api.stop() - else: - self.api.stop() - self.api.conn.close() - self.close() - self.api = None - else: - self.api = None - except EOFError: - self.api = None - self.ui.say("Connection has been closed") - except socket.error: - self.api = None - self.ui.say("Connection has been closed") - - def close(self): - """ Close both the connection and vdebug.ui. - """ - self.close_connection() - self.ui.close() - self.keymapper.unmap() - self.kill() - - def kill(self): - import os - if os.name is 'nt' and self.pydbgp is not None: - os.popen("taskkill /F /IM python.exe") diff --git a/plugin/python/vdebug/ui/.vimui.py.swp b/plugin/python/vdebug/ui/.vimui.py.swp deleted file mode 100644 index e69de29b..00000000 diff --git a/plugin/python/vdebug/ui/.vimui.py.un~ b/plugin/python/vdebug/ui/.vimui.py.un~ deleted file mode 100644 index 0b5c80d6fc6511c2d89f7b74ecd86affc96f002a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15179 zcmeI3O>Epm6vx-wv`tGxDJ=X8G-NC+yLo+{u_A;Ap^4p375|L1x3ILVq_r@qZoH)D@ILo@4q&F^{?;NKb#!zdHav|isw(%*Veu- z6pE9DqCHA??I@f@Ly@8>S@6;gJ--W)8m(~UJ=Va~#?`k3hgbOX zVf0Pa-vrMwltj_yLlRd;QClcq5qP{~7tf6l|70pfQrpWmMo5(AKshWwcIG4}4S?dR9V|C{ zV!Kk5Rf=Ba`b9%2fl1gjBP2}P!4aOjP)aT2DFFCE8o(n8aHUcmoLQ_^r)#q%6G4e; zpEWpQB)W%K=g?6LdCLEx>)Z}quTFo2wci>ZK@#3^);W08LY@M6AK89K)o)-4a}p(I ztYqNSt6bp3)1|%Sd3syeOO^SWf2lSb%yEw~bE#erYRi!c5cz%V(Fn}}eY()A3dy&G z34EMp0%@U_s18`eBSxZgq1RGMeuqH!NgBHJ&`Vey*5C+|@XoN#gT-8 zlxlE2iH9=uzS}sICIhLz9IP&n4va~8eqnUt-2AC9#7;5pGOv@UeH9f^@Fn#7@l&Be z&=P(7zt!xe>thqKvrnF;z=mB>=8jv!o!x+*h2y z0|_w13LqZAu~xy+>zKVc#5xEd@}5u}IMqb9GIjxI)!qVjYJUKC%LYe8NVFAS!3_l0 z)vr@zWzI)#wO*aB&sSg%N&3e02a;?aile8R$W}H*?%}5o zdz45ySeafZb#ql(>K*Lu>+aK35PdcBeH?={yAQ?DRZV0oo1*)(?XPew56jDl?ofg* zB5q@#{+K^p)-X(m?Xm_9#OyZ|hgCI^t!y1DJjz4HEy7w(U`-9h!$W6IoEiwm;($zd z8zO`?}$8Xc;mP+PxooMAc zAPb#vhq7hu>id2CH|9S(WT?|KAJ;LUgatV7wDhr~L$4X?zuDC3otj*b#s(7|^Qbiz zAdBvEd2dTGSq>AJ>{m>-bN()v4#bn)c9`f%Pgp|$GI3(rK)4ucX(q#AtVw8<%XZzC z5tAI_L;UNuH!%ap1?D7fVB)2V5mY3Zfy1Tb(lb51gWE^6BPpBD9iZt@qG=NwQ?w~3 z+VG^|2(4WY8up|&+_a=-gyH{cP=P6n(j^V)%vaTtt&BBk%vY1UG+#M}`Tm$@zJ~?o z7SrvG7&kNu$x7le&qcSkWU|p`GJbRBIvhQQ2MtG+G}Z3LjW(I79bw4=CL6~FXQot1 zc8N7<%v7UnC;HSVyDnzh5xU|1*Uzeek+YlrGGi`HC7c|B1J( zwpP&{%~u2)ts9%8ED{%?@Pq5eO52+~azMWy1+hr`;FqyIY!hpRrpuH~BtqH{o%^ U;U(war&8N#3?q^9m0!R75BUsf0RR91 diff --git a/plugin/python/vdebug/ui/__init__.py b/plugin/python/vdebug/ui/__init__.py deleted file mode 100644 index 2f00741b..00000000 --- a/plugin/python/vdebug/ui/__init__.py +++ /dev/null @@ -1 +0,0 @@ -__all__ = ["interface","vimui"] diff --git a/plugin/python/vdebug/ui/interface.py b/plugin/python/vdebug/ui/interface.py deleted file mode 100644 index a69f9233..00000000 --- a/plugin/python/vdebug/ui/interface.py +++ /dev/null @@ -1,60 +0,0 @@ -class Ui(): - """Abstract for the UI, used by the debugger - """ - tracewin = None - watchwin = None - stackwin = None - statuswin = None - logwin = None - sourcewin = None - - def __init__(self): - self.is_open = False - - def __del__(self): - self.close() - - def open(self): - pass - - def say(self,string): - pass - - def close(self): - pass - - def log(self): - pass - -class Window: - """Abstract for UI windows - """ - name = "WINDOW" - is_open = False - - def __del__(self): - self.destroy() - - def on_create(self): - """ Callback for after the window is created """ - pass - - def create(self): - """ Create the window """ - pass - - def write(self, msg): - """ Write string in the window """ - pass - - def insert(self, msg, position = None): - """ Insert a string somewhere in the window """ - pass - - def destroy(self): - """ Close window """ - pass - - def clean(self): - """ clean all data in buffer """ - pass diff --git a/plugin/python/vdebug/ui/vimui.py b/plugin/python/vdebug/ui/vimui.py deleted file mode 100644 index 47bf932b..00000000 --- a/plugin/python/vdebug/ui/vimui.py +++ /dev/null @@ -1,625 +0,0 @@ -# coding=utf-8 -import vdebug.ui.interface -import vdebug.util -import vim -import vdebug.log -import vdebug.opts - -class Ui(vdebug.ui.interface.Ui): - """Ui layer which manages the Vim windows. - """ - - def __init__(self,breakpoints): - vdebug.ui.interface.Ui.__init__(self) - self.is_open = False - self.breakpoint_store = breakpoints - self.emptybuffer = None - self.breakpointwin = BreakpointWindow(self,'rightbelow 7new') - self.current_tab = "1" - self.tabnr = None - - def is_modified(self): - modified = int(vim.eval('&mod')) - if modified: - return True - else: - return False - - def open(self): - if self.is_open: - return - self.is_open = True - - try: - existing_buffer = True - cur_buf_name = vim.eval("bufname('%')") - if cur_buf_name is None: - existing_buffer = False - cur_buf_name = '' - - self.current_tab = vim.eval("tabpagenr()") - - vim.command('silent tabnew') - self.empty_buf_num = vim.eval('bufnr("%")') - if existing_buffer: - vim.command('call Vdebug_edit("%s")' % cur_buf_name) - - self.tabnr = vim.eval("tabpagenr()") - - srcwin_name = self.__get_srcwin_name() - - self.tracewin = TraceWindow(self,'vertical belowright new') - self.tracewin.create() - - self.watchwin = WatchWindow(self,'belowright new') - self.watchwin.create() - - self.stackwin = StackWindow(self,'belowright new') - self.stackwin.create() - - self.statuswin = StatusWindow(self,'belowright new') - self.statuswin.create() - self.statuswin.set_status("loading") - - # self.tracewin.set_height(3) - self.watchwin.set_height(40) - # self.stackwin.set_height(3) - self.statuswin.set_height(3) - - logwin = LogWindow(self,'rightbelow 6new') - vdebug.log.Log.set_logger(\ - vdebug.log.WindowLogger(\ - vdebug.opts.Options.get('debug_window_level'),\ - logwin)) - - winnr = self.__get_srcwinno_by_name(srcwin_name) - self.sourcewin = SourceWindow(self,winnr) - self.sourcewin.focus() - except Exception as e: - self.is_open = False - raise e - - def set_source_position(self,file,lineno): - self.sourcewin.set_file(file) - self.sourcewin.set_line(lineno) - self.sourcewin.place_pointer(lineno) - - def mark_as_stopped(self): - if self.is_open: - if self.sourcewin: - self.sourcewin.remove_pointer() - if self.statuswin: - self.statuswin.set_status("stopped") - self.remove_conn_details() - - def set_conn_details(self,addr,port): - self.statuswin.insert("Connected to %s:%s" %(addr,port),2,True) - - def remove_conn_details(self): - self.statuswin.insert("Not connected",2,True) - - def set_listener_details(self,addr,port,idekey): - details = "Listening on %s:%s" %(addr,port) - if len(idekey): - details += " (IDE key: %s)" % idekey - self.statuswin.insert(details,1,True) - - def get_current_file(self): - return vdebug.util.LocalFilePath(vim.current.buffer.name) - - def get_current_row(self): - return vim.current.window.cursor[0] - - def get_current_line(self): - return self.get_line(self.get_current_row()) - - def get_line(self,row): - return vim.eval("getline(" + str(row) + ")") - - def register_breakpoint(self,breakpoint): - if breakpoint.type == 'line': - self.place_breakpoint(breakpoint.id,\ - breakpoint.file,breakpoint.line) - if self.breakpointwin.is_open: - self.breakpointwin.add_breakpoint(breakpoint) - - def place_breakpoint(self,sign_id,file,line): - vim.command('sign place '+str(sign_id)+\ - ' name=breakpt line='+str(line)+\ - ' file='+file.as_local()) - - def remove_breakpoint(self,breakpoint): - id = breakpoint.id - vim.command('sign unplace %i' % id) - if self.breakpointwin.is_open: - self.breakpointwin.remove_breakpoint(id) - - def get_breakpoint_sign_positions(self): - sign_lines = self.command('sign place').split("\n") - positions = {} - for line in sign_lines: - if "name=breakpt" in line: - attributes = line.strip().split() - lineinfo = attributes[0].split('=') - idinfo = attributes[1].split('=') - positions[idinfo[1]] = lineinfo[1] - return positions - - # Execute a vim command and return the output. - def command(self,cmd): - vim.command('redir => _tmp') - vim.command('silent %s' % cmd) - vim.command('redir END') - return vim.eval('_tmp') - - def say(self,string): - """ Vim picks up Python prints, so just print """ - print str(string) - vdebug.log.Log(string,vdebug.log.Logger.INFO) - - def error(self,string): - vim.command('echohl Error | echo "'+\ - str(string).replace('"','\\"')+\ - '" | echohl None') - vdebug.log.Log(string,vdebug.log.Logger.ERROR) - - def close(self): - if not self.is_open: - return - self.is_open = False - - vdebug.log.Log.remove_logger('WindowLogger') - if self.tabnr: - vim.command('silent! '+self.tabnr+'tabc!') - if self.current_tab: - vim.command('tabn '+self.current_tab) - - if self.empty_buf_num: - vim.command('bw' + self.empty_buf_num) - - if self.tracewin: - self.tracewin.destroy() - if self.watchwin: - self.watchwin.destroy() - if self.stackwin: - self.stackwin.destroy() - if self.statuswin: - self.statuswin.destroy() - - self.tracewin = None - self.watchwin = None - self.stackwin = None - self.statuswin = None - vim.command('set bexpr=IPythonBalloonExpr()') - - - def __get_srcwin_name(self): - return vim.current.buffer.name - - def __get_srcwinno_by_name(self,name): - i = 1 - vdebug.log.Log("Searching for win by name %s" % name,\ - vdebug.log.Logger.INFO) - for w in vim.windows: - vdebug.log.Log("Win %d, name %s" %(i,w.buffer.name),\ - vdebug.log.Logger.INFO) - if w.buffer.name == name: - break - else: - i += 1 - - vdebug.log.Log("Returning window number %d" % i,\ - vdebug.log.Logger.INFO) - return i - - def __get_buf_list(self): - return vim.eval("range(1, bufnr('$'))") - -class SourceWindow(vdebug.ui.interface.Window): - - file = None - pointer_sign_id = '6145' - breakpoint_sign_id = '6146' - prevline = 0 - - def __init__(self,ui,winno): - self.winno = str(winno) - - def focus(self): - vim.command(self.winno+"wincmd w") - - def command(self,cmd,silent = True): - self.focus() - prepend = "silent " if silent else "" - command_str = prepend + self.winno + "wincmd " + cmd - vim.command(command_str) - - def set_file(self,file): - if file == self.file: - return - self.file = file - vdebug.log.Log("Setting source file: "+file,vdebug.log.Logger.INFO) - self.focus() - vim.command('call Vdebug_edit("%s")' % str(file).replace("\\", "\\\\")) - - def set_line(self,lineno): - self.focus() - vim.command("normal %sgg" % str(lineno)) - - def get_file(self): - self.focus() - self.file = vdebug.util.LocalFilePath(vim.eval("expand('%:p')")) - return self.file - - def clear_signs(self): - vim.command('sign unplace *') - - def place_pointer(self,line): - vdebug.log.Log("Placing pointer sign on line "+str(line),\ - vdebug.log.Logger.INFO) - - vim.command('sign undefine current') - vim.command('sign define current text=-> texthl=DbgCurrentSign linehl=DbgCurrentLine') - - vim.command('sign place '+self.pointer_sign_id+\ - ' name=current line='+str(line)+\ - ' file='+self.file) - - overmargin = abs( self.prevline - int( vim.eval("line('.')") ) ) > 20 - if overmargin: - vim.command('exe "normal zz"') - self.prevline = int(vim.eval("line('.')")) - if int(vim.eval("line('.')")) > 15: - vim.command('exe "normal 10\"') - vim.command('redraw') - - def remove_pointer(self): - vim.command('sign unplace %s' % self.pointer_sign_id) - -class Window(vdebug.ui.interface.Window): - name = "WINDOW" - open_cmd = "new" - creation_count = 0 - - context_sav = None - def __init__(self,ui,open_cmd): - self.buffer = None - self.ui = ui - self.open_cmd = open_cmd - self.is_open = False - - def getwinnr(self): - return int(vim.eval("bufwinnr('"+self.name+"')")) - - def set_height(self,height): - height = int(height) - minheight = int(vim.eval("&winminheight")) - if height < minheight: - height = minheight - if height <= 0: - height = 1 - self.command('set winheight=%i' % height) - - def write(self, msg, return_focus = True, after = "normal G"): - if not self.is_open: - self.create() - if return_focus: - prev_win = vim.eval('winnr()') - if self.buffer_empty(): - self.buffer[:] = str(msg).split('\n') - else: - self.buffer.append(str(msg).split('\n')) - self.command(after) - if return_focus: - vim.command('%swincmd W' % prev_win) - - def insert(self, msg, lineno = None, overwrite = False, allowEmpty = False): - if not self.is_open: - self.create() - """ insert into current position in buffer""" - if len(msg) == 0 and allowEmpty == False: - return - if self.buffer_empty(): - self.buffer[:] = str(msg).split('\n') - else: - if lineno == None: - (lineno, rol) = vim.current.window.cursor - remaining_buffer = str(msg).split('\n') - if overwrite: - lfrom = lineno + 1 - else: - lfrom = lineno - remaining_buffer.extend(self.buffer[lfrom:]) - del self.buffer[lineno:] - if self.buffer_empty(): - self.buffer[:] = remaining_buffer - else: - for line in remaining_buffer: - self.buffer.append(line) - self.command(str(lfrom)) - - def delete(self,start_line,end_line): - try: - self.buffer[end_line] - remaining_buffer = self.buffer[end_line:] - del self.buffer[start_line:] - self.buffer.append(remaining_buffer) - except IndexError: - del self.buffer[start_line:] - - def buffer_empty(self): - if len(self.buffer) == 1 \ - and len(self.buffer[0]) == 0: - return True - else: - return False - - def create(self): - """ create window """ - vim.command('silent ' + self.open_cmd + ' ' + self.name) - vim.command("setlocal buftype=nofile modifiable "+ \ - "winfixheight winfixwidth") - self.buffer = vim.current.buffer - self.is_open = True - self.creation_count += 1 - self.on_create() - - def destroy(self): - """ destroy window """ - if self.buffer == None or len(dir(self.buffer)) == 0: - return - self.is_open = False - if int(vim.eval('buffer_exists("'+self.name+'")')) == 1: - vim.command('bwipeout ' + self.name) - - def clean(self): - """ clean all datas in buffer """ - self.buffer[:] = [] - - def command(self, cmd): - """ go to my window & execute command """ - winnr = self.getwinnr() - if winnr != int(vim.eval("winnr()")): - vim.command(str(winnr) + 'wincmd w') - vim.command(cmd) - - def accept_value(self,value): - self.write(value) - - def accept_renderer(self,renderer): - self.write(renderer.render()) - - def redisplay(self): - if self.context_sav: - self.write(self.context_sav.render()) - else: - self.write('') - - -class BreakpointWindow(Window): - name = "DebuggerBreakpoints" - is_visible = False - header = """=========================================================== - ID | TYPE | DATA -===========================================================""" - - def on_create(self): - self.clean() - self.write(self.header) - self.command('setlocal syntax=debugger_breakpoint') - for bp in self.ui.breakpoint_store.get_sorted_list(): - self.add_breakpoint(bp) - if self.creation_count == 1: - cmd = 'silent! au BufWinLeave %s :silent! bdelete %s' %(self.name,self.name) - vim.command('%s | python debugger.runner.ui.breakpointwin.is_open = False' % cmd) - - def add_breakpoint(self,breakpoint): - bp_str = " %-7i | %-11s | " %(breakpoint.id,breakpoint.type) - if breakpoint.type == 'line': - bp_str += "%s:%s" %(breakpoint.file,str(breakpoint.line)) - elif breakpoint.type == 'conditional': - bp_str += "%s:%s when (%s)" \ - %(breakpoint.file,str(breakpoint.line),breakpoint.condition) - elif breakpoint.type == 'exception': - bp_str += "Exception: %s" % breakpoint.exception - elif breakpoint.type == 'call' or \ - breakpoint.type == 'return': - bp_str += "Function: %s" % breakpoint.function - - self.write(bp_str) - - def remove_breakpoint(self,breakpoint_id): - i = 0 - for l in self.buffer: - bp_str = " %i " % breakpoint_id - bp_id_len = len(bp_str) - if l[:bp_id_len] == bp_str: - del self.buffer[i] - i += 1 - -class LogWindow(Window): - name = "DebuggerLog" - - def on_create(self): - self.command('setlocal syntax=debugger_log') - if self.creation_count == 1: - vim.command('silent! au BufWinLeave %s :silent! bdelete %s' %(self.name,self.name)) - - def write(self, msg, return_focus = True): - Window.write(self, msg,return_focus=True) - -class StackWindow(Window): - name = "DebuggerStack" - - def on_create(self): - self.command('inoremap '+\ - ':python debugger.handle_return_keypress()') - self.command('nnoremap '+\ - ':python debugger.handle_return_keypress()') - self.command('nnoremap <2-LeftMouse> '+\ - ':python debugger.handle_double_click()') - self.command('setlocal syntax=debugger_stack') - if self.creation_count == 1: - cmd = 'silent! au BufWinLeave %s :silent! bdelete %s' %(self.name,self.name) - vim.command('%s | python debugger.runner.ui.stackwin.is_open = False' % cmd) - - def write(self, msg, return_focus = True): - Window.write(self, msg, after="normal gg") - -class TraceWindow(Window): - name = "TraceWindow" - - reserve_trace_code = None - last_context_rendered = None - def on_create(self): - self.command('inoremap '+\ - ':python debugger.handle_return_keypress()') - self.command('nnoremap '+\ - ':python debugger.handle_return_keypress()') - self.command('nnoremap <2-LeftMouse> '+\ - ':python debugger.handle_double_click()') - self.command('setlocal syntax=debugger_watch') - if self.creation_count == 1: - cmd = 'silent! au BufWinLeave %s :silent! bdelete %s' %(self.name,self.name) - vim.command('%s | python debugger.runner.ui.watchwin.is_open = False' % cmd) - - def write(self, msg, return_focus = True): - Window.write(self, msg, after="normal gg") - -class WatchWindow(Window): - name = "DebuggerWatch" - - def on_create(self): - self.command('inoremap '+\ - ':python debugger.handle_return_keypress()') - self.command('nnoremap '+\ - ':python debugger.handle_return_keypress()') - self.command('nnoremap <2-LeftMouse> '+\ - ':python debugger.handle_double_click()') - self.command('setlocal syntax=debugger_watch') - if self.creation_count == 1: - cmd = 'silent! au BufWinLeave %s :silent! bdelete %s' %(self.name,self.name) - vim.command('%s | python debugger.runner.ui.watchwin.is_open = False' % cmd) - - def write(self, msg, return_focus = True): - Window.write(self, msg, after="normal gg") - -class StatusWindow(Window): - name = "DebuggerStatus" - - def on_create(self): - keys = vdebug.util.Keymapper() - output = "Status: starting\nListening on port\nNot connected\n\n" - output += "Press %s to start debugging, " %(keys.run_key()) - output += "%s to stop/close. " %(keys.close_key()) - output += "Type :help Vdebug for more information." - - self.write(output) - - self.command('setlocal syntax=debugger_status') - if self.creation_count == 1: - cmd = 'au BufWinLeave %s :silent! bdelete %s' %(self.name,self.name) - vim.command('%s | python debugger.runner.ui.statuswin.is_open = False' % cmd) - - def set_status(self,status): - self.insert("Status: "+str(status),0,True) - - -class ResponseRenderer: - def __init__(self,response): - self.response = response - - def render(self): - pass - -class StackGetResponseRenderer(ResponseRenderer): - def render(self): - stack = self.response.get_stack() - string = "" - for s in stack: - where = s.get('where') if s.get('where') else 'main' - file = vdebug.util.FilePath(s.get('filename')) - line = "[%(num)s] %(where)s @ %(file)s:%(line)s" \ - %{'num':s.get('level'),'where':where,\ - 'file':str(file.as_local()),'line':s.get('lineno')} - string += line + "\n" - return string - - -class ContextGetResponseRenderer(ResponseRenderer): - - def __init__(self,response,title = None,contexts = {},current_context = 0): - ResponseRenderer.__init__(self,response) - self.title = title - self.contexts = contexts - self.current_context = current_context - - def render(self,indent = 0): - res = self.__create_tabs() - - if self.title: - res += "- %s\n\n" % self.title - - properties = self.response.get_context() - num_props = len(properties) - vdebug.log.Log("Writing %i properties to the context window" % num_props,\ - vdebug.log.Logger.INFO ) - for idx, prop in enumerate(properties): - final = False - try: - next_prop = properties[idx+1] - except IndexError: - final = True - next_prop = None - res += self.__render_property(prop,next_prop,final,indent) - - vdebug.log.Log("Writing to context window:\n"+res,vdebug.log.Logger.DEBUG) - - return res - - def __create_tabs(self): - res = [] - if self.contexts: - for id,name in self.contexts.iteritems(): - if self.current_context == id: - name = "*"+name - res.append("[ %s ]" % name) - if res: - return " ".join(res) + "\n\n" - else: - return "" - - def __render_property(self,p,next_p,last = False,indent = 0): - line = "%(indent)s %(marker)s %(name)s = (%(type)s)%(value)s" \ - %{'indent':"".rjust((p.depth * 2)+indent),\ - 'marker':self.__get_marker(p),'name':p.display_name.encode('latin1'),\ - 'type':p.type_and_size(),'value': " " + p.value} - line = line.rstrip() + "\n" - - if vdebug.opts.Options.get('watch_window_style') == 'expanded': - depth = p.depth - if next_p and not last: - next_depth = next_p.depth - if depth == next_depth: - next_sep = "|" - num_spaces = depth * 2 - elif depth > next_depth: - next_sep = "/" - num_spaces = (depth * 2) - 1 - else: - next_sep = "\\" - num_spaces = (depth * 2) + 1 - - line += "".rjust(num_spaces+indent) + " " + next_sep + "\n" - elif depth > 0: - line += "".rjust((depth * 2) - 1 + indent) + " /" + "\n" - return line - - def __get_marker(self,property): - char = vdebug.opts.Options.get('marker_default') - if property.has_children: - if property.child_count() == 0: - char = vdebug.opts.Options.get('marker_closed_tree') - else: - char = vdebug.opts.Options.get('marker_open_tree') - return char diff --git a/plugin/python/vdebug/util.py b/plugin/python/vdebug/util.py deleted file mode 100644 index 1b33ff51..00000000 --- a/plugin/python/vdebug/util.py +++ /dev/null @@ -1,238 +0,0 @@ -import vdebug.opts -import vdebug.log -import vim -import re -import os -import urllib -import time - -class Keymapper: - """Map and unmap key commands for the Vim user interface. - """ - - exclude = ["run","set_breakpoint","eval_visual"] - - def __init__(self): - self._reload_keys() - self.is_mapped = False - self.existing = [] - - def run_key(self): - return self.keymaps['run'] - - def close_key(self): - return self.keymaps['close'] - - def map(self): - if self.is_mapped: - return - self._store_old_map() - self._reload_keys() - for func in self.keymaps: - if func not in self.exclude: - key = self.keymaps[func] - map_cmd = "noremap %s%s :python debugger.%s()" %\ - (self.leader,key,func) - vim.command(map_cmd) - self.is_mapped = True - - def _reload_keys(self): - self.keymaps = vim.eval("g:vdebug_keymap") - self.leader = vim.eval("g:vdebug_leader_key") - - def _store_old_map(self): - vim.command('let tempfile=tempname()') - tempfile = vim.eval("tempfile") - vim.command('mkexrc! %s' % (tempfile)) - regex = re.compile(r'^([nvxsoilc]|)(nore)?map!?') - split_regex = re.compile(r'\s+') - keys = set(v for (k,v) in self.keymaps.items() if k not in self.exclude) - special = set(["", "", "", "