PHPStorm Exporting and Importing Breakpoints

Does anyone know of a means to export PHPStorm breakpoints to a XML file or something and also reimport them. I think this would be a useful feature to have because I’m constantly creating groups of breakpoints that would be nice to easily recreate. So perhaps like breakpoint groups or something like that?

Hmmm… I’ve never seen any IDE do that. Primarily because it would be fairly difficult. As breakpoints are typically stored based on Line Number, so when your code changes and the line number shifts, recalling it would recall the breakpoint to a different location.

Most of the time, I run the debugger without any breakpoints, and it isn’t until I need it, that I enable it where I believe the error is occurring and then step my way down further.

What you most likely want to look at is workspace.xml in the .idea folder of the project. It handles the majority of mutable state info. I have played around with it a few times in the past to scaffold project configurations using domdocument in php. Switch to project files from “Project” scope in the project pane. Drop down arrow in this image https://www.jetbrains.com/img/webhelp/ps_projectToolWindowShowMembers.png

This should display the .idea folder

Look for the following in workspace.xml

  <component name="XDebuggerManager">
    <breakpoint-manager>
      <breakpoints>
        <line-breakpoint enabled="true" type="php">

this is saved on exit, ide frame loss of focus and refocus. If successful it will ask to reload the project. There also may be an off by one issue with the line number.

Have a play with it anyway.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.