* write the script in a file (for example foo.py) and add the
following statement at the beginning of the file:
import clewn.vim; clewn.vim.pdb()
* when pyclewn is installed locally and not as root, this
statement must be preceded with (so as to find the clewn
package):
import sys; sys.path.append('/home/user/lib/python')
* run the python script from vim with the following statement, the
script will be stopped by pdb at the statement following the
'clewn.vim.pdb()' statement:
:python execfile('foo.py')
* then start a second vim program to debug the script and run:
:Pyclewn pdb
In the second vim session, foo.py is automatically loaded and you can
'step', set breakpoints, print the backtrace, print variables values
or set them, display values in the vim balloon, etc...
--
Xavier
Les Chemins de Lokoti: http://lokoti.alwaysdata.net
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
No comments:
Post a Comment