@@ -24,9 +24,12 @@ avoid laborious task of finding and tuning of plugins/themes.
2424 * Compile project from and jump to errors/warnings
2525 * Run ExUnit tests and jump to errors
2626 * Run ExUnit tests on source save and just to errors
27+ * Tracing
28+ * Run trace on selected ExUnit test or text selection
29+ * Quickly navigate in trace file
2730 * Other
2831 * Colorschemes for Elixir programming
29- * Git integration directly from Vim.
32+ * Git integration directly from Vim
3033 * Viewing of Module/function documentation
3134 * Restore buffer position on load
3235 * Clutter free vim-airline settings
@@ -116,6 +119,8 @@ file using [vim-sleuth](https://github.com/tpope/vim-sleuth).
116119Tagbar most of the time shows correct arity on functions and does not report
117120multiple function clauses. GenServer callbacks moved to separate group.
118121
122+ * ` F4 ` will toggle Tagbar window visibility.
123+
119124## Compiler and ExUnit integration
120125
121126Compiler and ExUnit integration provided with vim-elixir-exunit module, which
@@ -209,14 +214,54 @@ Following commands and shortcuts are available:
209214
210215 Use ` [e ` and ` ]e ` to navigate test errors.
211216
212-
213217 ** Note**
214218
215219 All ` mix test ` commands executed with ` --seed 0 ` parameter which forces
216220 execution from top to down of test file. If you want randomized execution
217221 sequence to check hidden errors in tests - you will need to run tests
218222 manually.
219223
224+ ## Tracing support
225+
226+ Erlang runtime has amazing tools to understand what happens in code using trace
227+ and profiling. Unfortumately they have just command line interface and
228+ sometimes output is hard to understand. Vim-Elixir-IDE aims to boost developer
229+ efficiency while using this tools.
230+
231+ #### Running trace
232+
233+ You can run trace on arbitrary piece of code or existing ExUnit test case. I
234+ would recommend running it on ExUnit test, which assures that all aliases,
235+ variables are resolved. If you run trace on code selection it should be
236+ self-sufficient (it will be copied to separate .exs file).
237+
238+ So, once again, run ExUnit tests under tracing, not the selection :)
239+
240+ Tracing support removes some number of redundant messages appearing in trace
241+ log file and tries to make output more readable to human eyes and for
242+ inspection.
243+
244+ Also navigating around trace may be difficult, as there is so much information
245+ present, so navigation shortcuts are provided for that.
246+
247+ Available commands:
248+
249+ * ` ErlTraceTest ` or ` <Leader>te ` runs ExUnit test under cursor with tracing
250+ enabled and shows resulting trace in separate window.
251+ * ` ErlTraceSelection ` or ` <Leader>ts ` runs selected test with tracing enabled
252+ and shows resulting trace in separate window.
253+
254+ In tracing window there are shortcuts available:
255+
256+ * ` <Enter> ` opens file with module/function under cursor and switches window
257+ * ` p ` opens file with module/function under cursor and stays in trace window
258+ * ` % ` jumps to matching call/return lines
259+ * ` ; ` , ` , ` jumps back/forward to same function call
260+ * ` ( ` , ` ) ` jumps back/forward to next function call/return (skips messages)
261+ * ` { ` , ` } ` jumps back/forward over repeated function calls
262+ * ` F3 ` opens arguments fold; also when cursor is on function call/ret line
263+
264+
220265
221266
222267
@@ -228,3 +273,4 @@ Following commands and shortcuts are available:
228273
229274
230275
276+
0 commit comments