tigaDebugger
is a tiny debugger for F#.
vim ( above version 8, +python3, +terminal )
sdb
sdbplg
// download
$ git clone --depth 1 https://github.com/callmekohei/tigaDebugger
$ git clone --depth 1 https://github.com/roxma/nvim-yarp
$ git clone --depth 1 https://github.com/roxma/vim-hug-neovim-rpc
// install neovim plugins
$ pip3 install neovim
// set runtimepath
$ vim .vimrc
set runtimepath+=/path/to/tigaDebugger
set runtimepath+=/path/to/nvim-yarp
set runtimepath+=/path/to/vim-hug-neovim-rpc
01 - change readline for stable running
$ brew install readline
$ vim /usr/local/lib/sdb/sdb.exe.config
<configuration>
<dllmap dll="libedit" target="libedit.so.2" os="!windows" />
<dllmap dll="libedit" target="/usr/local/Cellar/readline/7.0.3_1/lib/libreadline.dylib" os="osx" />
</configuration>
02 - ambiwidth is single
" vimrc
set ambiwidth=single
// write fsharp code
$ vim foo.fsx
let foo() =
let mutable x = 1
x <- 2
x <- 3
x
foo ()
|> stdout.WriteLine
// compile file
$ fsharpc -g --optimize- foo.fsx
// open file
$ vim foo.fsx
// start debug mode
: TigaSetDebugger sdb
: Tiga foo.exe
// set break point
: TigaCommand bp add at foo.fsx 3
// run
: TigaCommand r
// next
: TigaCommand n
// quit debug mode
: TigaQuit
Press | To |
---|---|
ctrl b | Add or delete Breakpoint |
ctrl d | Delete all breakpoints |
ctrl r | Run |
ctrl k | Kill (Break) |
ctrl p | Replace watch variable |
ctrl y | Add watch variable |
ctrl t | Delete watch variable |
ctrl n | Step over ( Next ) |
ctrl i | Step In |
ctrl u | Step out ( Up ) |
ctrl c | Continue |
--optimize-
parameter is required.
// create exe file
$ fsharpc -g --optimize- foo.fsx
// create dll file
$ fsharpc -a -g --optimize- foo.fsx
see also: about top-level variables
Top-Level varibables needs full namespaces.
// file name is foo.fsx
module Bar =
let mutable x = "hello"
x <- "world"
stdout.WriteLine(x)
tiga command
: TigaWatchAdd Foo.Bar.x
result
─── Expressions ─────────────────
No locals
#0 'Foo.Bar.x':string it = "hello"
Terminal buffer
must have either a Terminal-Job
or Terminal-Normal
mode.
vim help
: help Terminal-mode
Terminal-Job mode
'i' or 'a'
Terminal-Normal mode ( enable to scroll )
CTRL-w N