IntelliJ doesn't save debug watch expressions

Answered

According to this bug report:

http://youtrack.jetbrains.com/issue/IDEA-42954

this is intended behaviour.

Could someone explain why it is desirable to forget all my carefully crafted watch expressions each time the toolwindow is closed? I think that the expressions should be permanently saved against each project.

Thanks for listening.

4 comments
Comment actions Permalink

Hi Rayz,
The main reasons are:
1. Expressions that make sense in some particular context in one debug session, will be very likely useless in successive debug sessions and different contexts, unless you debug exactly same places of code every time you start debugger. For this case we believe that it is enough to keep expressions until toolwindow is closed so that they survive multiple restarts of some particular debug session.
2. If all expressions are persisted across all debug sessions, there will be soon lots of stuff in watches view that is not relevant for particular debug context.

0
Comment actions Permalink

I know this is old, but I don't really agree with the assessment.

It is not necessary to apply all the watches to all the sessions. Saving a specific set of debug watches to a specific file, and loading them later when they are needed in a particular debugging session, would be immensely useful.

So, it would really be great if it would be possible to customize and save sets of watches.

 

0
Comment actions Permalink

I see, thanks for pointing it out. I wasn't aware of the task-context-saving command.

0

Please sign in to leave a comment.