mrennie/crossfire

changeBreakpoints does not work

mrennie opened this issue · 2 comments

FF 11 + FB 1.9.1 + CF 0.3a11

Steps:

  1. connect your favorite client
  2. send a changeBreakpoints request for a valid handle + valid attributes

In the example packet trace below I am trying to enable the FB breakpoint. The request is accepted and returns success but the bp does not become enabled.

[CROSSFIRE]WRITE PACKET: Content-Length:141\r\n\r\n{"arguments":{"attributes":{"enabled":true,"condition":"foo == null"},"handles":[1]},"command":"changeBreakpoints","seq":9,"type":"request"}\r\n

The FB bp is disabled in FB when the request is sent and I get the folllowing as a response:

[CROSSFIRE]READ PACKET: Content-Length:118\r\n\r\n{"type":"response","command":"changeBreakpoints","seq":10,"requestSeq":9,"body":{},"status":{"running":true,"code":0}}

Also the idea behind changeBreakpoints feels wrong to me, it should instead be changeBreakpoint, because in its current form you can give a collection of bp handles (fine) to update but they all have to accept the same set of changes, so for 100% of my test cases you end up sending a collection of one handle with the set of changes.

We should just remove the handle collection and have the request per breakpoint.

Pushed fix to: https://github.com/firebug-crossfire/crossfire/commit/b40c75f43a9dc914aee7437da48aa680bb0feefe

Part of the fix is to change the request to be changeBreakpoint rather than changeBreakpoints