Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(lang dune 2.x) won't hit breakpoints #20

Closed
victorvianna opened this issue Feb 14, 2020 · 7 comments
Closed

(lang dune 2.x) won't hit breakpoints #20

victorvianna opened this issue Feb 14, 2020 · 7 comments
Labels
bug Something isn't working

Comments

@victorvianna
Copy link

After quite some investigation, I've tracked down the reason my vscode wouldn't stop on breakpoints. If your dune-project file uses (lang dune $VERSION) where VERSION >= 2.0, it won't work, and the server won't display any errors.

@EduardoRFS
Copy link

@victorvianna did you had any progress here?

@ialak
Copy link

ialak commented Nov 25, 2020

@EduardoRFS I downgrade dune version to 1.11.4, OCaml version 4.07.1, it works

@sim642 sim642 added the bug Something isn't working label Jun 20, 2023
@vthemelis
Copy link

I'm not hitting any breakpoints either. I tried downgrading the dune language version which didn't help. Downgrading dune is kind of impossible. Does anyone have any insights on this?

@vthemelis
Copy link

I think I found the issue on my side. I had to set

(map_workspace_root false)

to my dune-project file. This was while using version 3.9 of the dune language.

Now I can hit the breakpoints no problem.

@sim642
Copy link
Collaborator

sim642 commented Jul 22, 2023

I haven't encountered the issue (nor have tried to reproduce it yet), but there's this commit on a fork: tizoc@8afcce8. Maybe that's trying to fix this issue?

@Zeta611
Copy link

Zeta611 commented Jul 31, 2023

@victorvianna Thank you, this saved my day!

I think I found the issue on my side. I had to set

(map_workspace_root false)

to my dune-project file. This was while using version 3.9 of the dune language.

Now I can hit the breakpoints no problem.

According to the docs, the default (map_workspace_root true) breaks the debug info.
This unfortunate situation is explained here.
Perhaps this issue should be more visible or documented somewhere, as people using recent versions of dune will likely encounter this issue.

@sim642
Copy link
Collaborator

sim642 commented Aug 1, 2023

I added a hint about map_workspace_root to the README: https://github.com/hackwaly/ocamlearlybird#breakpoints-not-hit-with-lang-dune-30-and-above.
Thanks to @vthemelis for suggesting it to be added to ocamllabs/vscode-ocaml-platform#1192 as well.

This fix is for (lang dune 3.0) though, not (lang dune 2.0) like the original issue which I couldn't reproduce. Nevertheless, I'm closing this issue for now. If it's still an issue for 2.x for someone, feel free to reopen/leave a comment.

@sim642 sim642 closed this as completed Aug 1, 2023
@sim642 sim642 changed the title lang dune 2.x won't hit breakpoints (lang dune 2.x) won't hit breakpoints Aug 1, 2023
@sim642 sim642 unpinned this issue Aug 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants