Notify the user that evaluating a variable/expression in the debugger caused a breakpoint to be skipped #1228
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
awaiting
author
awaiting
contributors
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
diagnostics
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
Feature/S3
Importance
High
Importance
Low
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
Release Blocking
Non-urgent
Release Blocking
Urgent
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
Urgency
High
Urgency
Low
ux
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lix-project/lix#1228
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Is your feature request related to a problem? Please describe.
When debugging nix code, you often evaluate a bunch of different expressions and local variables to figure out what's going wrong. However, if one of those expressions reaches a breakpoint, it will be silently skipped and will not be accessible again (at least not for this value of the expression containing the breakpoint).
AFAIK, part of this is semi-intentional. However, it can be confusing to users why a certain breakpoint is seemingly never reached, especially beginners that don't understand the intricacies of expression caching.
Describe the solution you'd like
The more reasonable, immediately-actionnable thing to do here would be to at least warn the user that a breakpoint got skipped, and that it may not break later [because of internal details/expression caching/etc.].
The better (though still imperfect) solution would be to just not cache either just breakpoints or all expressions when in the debugger's repl. This would allow breakpoints to be hit later on like they would normally, no matter what the user did during a previous break.
Describe alternatives you've considered
We could undo the previously linked change, though I believe that without actual design around it and UX consideration, it would just be confusing for users and overall annoying (for example, think about trying to eval an attrset that contains errors, and entering the debugger halfway through printing it)