debugger icon indicating copy to clipboard operation
debugger copied to clipboard

[Log Point] messages should be prefixed and nested

Open jasonLaster opened this issue 7 years ago • 4 comments

It would be really nice if we added some context to the typical message that documents the control flow. These are things i think most engineers do already when logging, but we could simplify. In the example below // LOG refers to a log point

function foo(a) {
  // LOG "starting", { a }
  bar(a);
  bar(a);
  // LOG "ending", { a }
}

function bar(a) {
  const name = `yo ${a}`
  // LOG name
}

Console Output

foo(2); foo starting, { a: 2} .. bar yo 2 .. bar yo 2 foo ending, { a: 2}

jasonLaster avatar Feb 08 '19 22:02 jasonLaster

/claim

soniasingla avatar Mar 01 '19 10:03 soniasingla

Thanks for claiming the issue! :wave:

Here are some links for getting setup, contributing, and developing. We're always happy to answer questions in slack! If you become busy, feel free to /unclaim it.

:fox_face: Debugger team!

claim avatar Mar 01 '19 10:03 claim

@soniasingla i think this feature requires server-side changes

here's where log points are implemented on the server https://searchfox.org/mozilla-central/source/devtools/server/actors/breakpoint.js#214

here are some docs on getting started.

jasonLaster avatar Mar 01 '19 13:03 jasonLaster

Firefox Developer Tools (including Debugger tool) development is now entirely happening in Bugzilla and new issues should be reported here: https://bugzilla.mozilla.org/enter_bug.cgi?product=DevTools&component=Debugger

Please reopen this report in Bugzilla if it's still valid.

Honza

janodvarko avatar Feb 26 '21 15:02 janodvarko