vscode-ocaml icon indicating copy to clipboard operation
vscode-ocaml copied to clipboard

Support "restart frame" debugging feature

Open hackwaly opened this issue 9 years ago • 0 comments

see: https://code.visualstudio.com/updates/July_2016#_debugging.

The debugger ocamldebug support start command which corresponds to this. But, after my test, I found it didn't work as expect.

let test () = 
  print_endline "hello"

let main () = 
  test ()
;;
main ()
➜  debugtest ocamldebug ./a.out
        OCaml Debugger version 4.03.0

(ocd) break @ Main 2
Loading program... done.
Breakpoint 1 at 9736: file ./main.ml, line 2, characters 3-24
(ocd) run
Time: 13 - pc: 9736 - module Main
Breakpoint: 1
2   <|b|>print_endline "hello"
(ocd) start
Time: 11 - pc: 8772 - module Pervasives
523 let _ = register_named_value "Pervasives.do_at_exit" do_at_exit<|a|>
(ocd) run
Time: 13 - pc: 9736 - module Main
Breakpoint: 1
2   <|b|>print_endline "hello"
(ocd) backstep
Time: 12 - pc: 9720 - module Main
5   <|b|>test ()
(ocd)

Do I misunderstand the start command?

hackwaly avatar Aug 05 '16 03:08 hackwaly