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

Breakpoints only worked inside the _build/default/ directory #58

Open
Mng12345 opened this issue Feb 7, 2024 · 3 comments
Open

Breakpoints only worked inside the _build/default/ directory #58

Mng12345 opened this issue Feb 7, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@Mng12345
Copy link

Mng12345 commented Feb 7, 2024

The breakpoint can not be add in the source file, when i click the line in source file, the breakpoint is added in the file located in _build/default directory.
Screen-shot is here.
image

@sim642 sim642 added the enhancement New feature or request label Feb 7, 2024
@sim642
Copy link
Collaborator

sim642 commented Feb 7, 2024

I've found this to be more annoying in terms of modifying the files because after debugging, you might have the _build copy open instead of the original source, but that's read-only.

I think the problem is that dune-built artifacts are all based on the sources copied to _build and thus debug information refers to those paths instead of the ones in original sources. It's not as simple as just dropping _build/default/ for various reasons:

  1. Users might use some other dune contexts as default.
  2. Some sources are generated, so no original source exists (unless dune promotion is being used).
  3. Some sources are transformed (e.g. by ppx), so original and built sources are different (with different line numbers).

@Mng12345
Copy link
Author

Mng12345 commented Feb 7, 2024

Yes, it did be a little annoying...... I have got notified a lot of times by warning the file in _build/default can not be modified.

@Mng12345
Copy link
Author

Mng12345 commented Feb 7, 2024

mnggiflab-video-to-gif (28)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants