Closed Mng12345 closed 6 months ago
Have you noticed https://github.com/hackwaly/ocamlearlybird?tab=readme-ov-file#breakpoints-not-hit-with-lang-dune-30-and-above
Thanks for the reply, i have already changed my dune version to 3.7 and set (map_workspace_root false)
, the breakpoints are still unrerified.
You could set source_dirs
in launch.json to specify additional search dirs. See https://github.com/hackwaly/ocamlearlybird/blob/63f0a3fbc2fc0af388f984da1d447eefa708c39b/src/adapter/debug_protocol_ex.ml#L46
Sadly, looks like it hasn't implemented.
Yes, this still not fix my problem.
And i noticed that the module name has been changed in the debuginfo of bc executable file. Eg, the source file is Cli.ml, but it changed to DuneexeCli, did this changes will break the module resolving? I am not very familar with ocamlearlybird code.
I think it won't. You can log the search_dirs
and dig into search_dirs to see what's inside. Maybe this will give us some clues.
I logged the search dirs, the log shows it searches in path /workspace_root
, i don't know what the path /workspace_root
mean, it does not existed in my wsl2 ubuntu system.
search dir: /workspace_root/vendor/ext
search dir: /workspace_root/vendor/ext/.ext.objs/byte
search dir: /workspace_root/vendor/json
search dir: /workspace_root/vendor/json/.jsonlib.objs/byte
search dir: /workspace_root/vendor/ml
search dir: /workspace_root/vendor/ml/.ml.objs/byte
search dir: /workspace_root/vendor/res_syntax
search dir: /workspace_root/vendor/res_syntax/.syntax.objs/byte
module: Std_exit file: /home/ming/.opam/4.14.0/lib/ocaml
module: Std_exit file: /home/ming/.opam/4.14.0/.opam-switch/build/ocaml-base-compiler.4.14.0/stdlib
module: Dune__exe__Cli file: /workspace_root
module: Dune__exe__Cli file: /workspace_root/src
module: Dune__exe__Cli file: /workspace_root/src/.Cli.eobjs/byte
module: Dune__exe__Commands file: /workspace_root
module: Dune__exe__Commands file: /workspace_root/src
module: Dune__exe__Commands file: /workspace_root/src/.Cli.eobjs/byte
module: Dune__exe__SignatureHelp file: /workspace_root
module: Dune__exe__SignatureHelp file: /workspace_root/src
module: Dune__exe__SignatureHelp file: /workspace_root/src/.Cli.eobjs/byte
module: Dune__exe__SemanticTokens file: /workspace_root
module: Dune__exe__SemanticTokens file: /workspace_root/src
module: Dune__exe__SemanticTokens file: /workspace_root/src/.Cli.eobjs/byte
module: Dune__exe__Hover file: /workspace_root
module: Dune__exe__Hover file: /workspace_root/src
module: Dune__exe__Hover file: /workspace_root/src/.Cli.eobjs/byte
module: Dune__exe__Markdown file: /workspace_root
module: Dune__exe__Markdown file: /workspace_root/src
module: Dune__exe__Markdown file: /workspace_root/src/.Cli.eobjs/byte
module: Dune__exe__Hint file: /workspace_root
module: Dune__exe__Hint file: /workspace_root/src
module: Dune__exe__Hint file: /workspace_root/src/.Cli.eobjs/byte
module: Dune__exe__DumpAst file: /workspace_root
module: Dune__exe__DumpAst file: /workspace_root/src
module: Dune__exe__DumpAst file: /workspace_root/src/.Cli.eobjs/byte
module: Dune__exe__DocumentSymbol file: /workspace_root
module: Dune__exe__DocumentSymbol file: /workspace_root/src
module: Dune__exe__DocumentSymbol file: /workspace_root/src/.Cli.eobjs/byte
module: Dune__exe__Diagnostics file: /workspace_root
module: Dune__exe__Diagnostics file: /workspace_root/src
module: Dune__exe__Diagnostics file: /workspace_root/src/.Cli.eobjs/byte
module: Dune__exe__DceCommand file: /workspace_root
module: Dune__exe__DceCommand file: /workspace_root/src
It seems your (map_workspace_root false) not takes effect.
Ohh! sorry, it's my fault, i forgot to change map_workspace_root true to false!! It works now, thank you!
I have noticed that we can not set breakpoints in vscode for dune build bc executable file, and i build a custom earlybird with printting some logs in the console, the logs show that some modules are not found when adding fragment.
Below are some parts of the console log.