GCLI needs commands to support breakpoint stepping

RESOLVED FIXED in Firefox 16



Developer Tools: Console
6 years ago
5 years ago


(Reporter: jwalker, Assigned: vporof)


(Blocks: 1 bug)

Firefox 16
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)


(Whiteboard: [gclicommands])


(2 attachments, 1 obsolete attachment)

See notes on bug 683503.
Something to consider is emulating the relevant commands for GDB:


We could also consider expanding the scope of the GDB emulation to add command aliases for all GDB commands supported by our debugger.
GCLI Triage.
Target Milestone: Firefox 14 → Firefox 15
Blocks: 745773
No longer blocks: 745773
Target Milestone: Firefox 15 → Firefox 16


5 years ago
Assignee: nobody → vporof

Comment 3

5 years ago
Created attachment 636656 [details] [diff] [review]

We'll need new strings for stepping because I took them from somewhere.
Attachment #636656 - Flags: review?(jwalker)
Comment on attachment 636656 [details] [diff] [review]

Review of attachment 636656 [details] [diff] [review]:

I do think we need to add some tests for these commands. We've skipped it in the past and got bitten.
It's not hard, because there is a framework to help.

- browser/devtools/commandline/test/browser_gcli_commands.js
- browser/devtools/commandline/test/browser_gcli_edit.js

There is even documentation (which I should perhaps move to MDN):
- browser/devtools/commandline/test/head.js
  See the doc comments for DeveloperToolbarTest.checkInputStatus()
  and DeveloperToolbarTest.exec()

Attachment #636656 - Flags: review?(jwalker)
Blocks: 768998
Whiteboard: [gclicommands]
Unfortunately I need to add a breakpoint and this process is async ... so blocked by bug 773313
Depends on: 773313
Created attachment 641947 [details] [diff] [review]
Patch with working test

Works now so we should be fine to land depending on review.
Attachment #636656 - Attachment is obsolete: true
Attachment #641947 - Flags: review?(past)
Attachment #641947 - Attachment is patch: true
Comment on attachment 641947 [details] [diff] [review]
Patch with working test

Review of attachment 641947 [details] [diff] [review]:

The only issue I found was a window leak I got when I ran the test. I believe using the registerCleanupFunction idea from the debugger mochitests would fix it.

::: browser/devtools/commandline/test/resources_dbg.html
@@ +27,5 @@
> +    function stepOverMe() {
> +      output.value = "step over";
> +    }
> +
> +    function checkTestPaused() {

Nit: this function looks unused.
Attachment #641947 - Flags: review?(past) → review+
Created attachment 642199 [details] [diff] [review]
Addressed reviewers comments

Whiteboard: [gclicommands] → [gclicommands][land-in-fx-team]
Whiteboard: [gclicommands][land-in-fx-team] → [gclicommands][fixed-in-fx-team]
Last Resolved: 5 years ago
Resolution: --- → FIXED
Whiteboard: [gclicommands][fixed-in-fx-team] → [gclicommands]
Commented in the wrong bug this morning.

> The skipped statements are executed, but not stepped through
Could you explain the meaning of this string?

Side note: copy&paste of l10n comments (clearly wrong, e.g. "A very short string used to describe thefunction of the dbg step over command.") is kind of worse than having no comments at all.
> > The skipped statements are executed, but not stepped through
> Could you explain the meaning of this string?

I can give it a shot ... it is easier to understand when compared with Step In.

Step In and Step Over differ in only one respect, the way they handle function calls. Either command instructs the debugger to execute the next line of code. If the line contains a function call, Step Into executes only the call itself, then halts at the first line of code inside the function. Step Over executes the entire function, then halts at the first line outside the function. Use Step Into if you want to look inside the function call. Use Step Over if you want to avoid stepping into functions.

Bug 774603 has been created so that we can fix any errors in gclicommands.properties, please log any other issues in that bug.
Blocks: 774603
You need to log in before you can comment on or make changes to this bug.