Using PHPStorm to switch Git branches is great, but it usually throws all of my breakpoints around when there is a large difference between the new branch HEAD and the old one. Is there a way to snapshot what files were open and what lines had breakpoints on them?
When closing PHPStorm and re-opening it, those values are saved. Is there a way to leverage that same information on switching Git branches?
You're looking for Tasks & Contexts (Tools > Tasks & Contexts > Open Task or Switch Task)
Windows: Alt
-Shift
-N
for Open, and Alt
-Shift
-T
to Switch.
Open Task will allow you to create a new Task. This will prompt you to create a git branch when you create a new Task. This task will be associated with the branch, and will be automatically marked as closed when you commit. By associating the task with a branch, PhpStorm will automatically switch between branches, along with its default task behaviour of closing/opening task-relevant files. This should preserve your breakpoints.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With