Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Issue 2500493003: [DevTools] make breakpoints better (Closed)

Created:
4 years, 1 month ago by kozy
Modified:
4 years, 1 month ago
Reviewers:
dgozman, lushnikov
CC:
chromium-reviews, caseq+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, apavlov+blink_chromium.org, devtools-reviews_chromium.org, blink-reviews, pfeldman, kozyatinskiy+blink_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[DevTools] make breakpoints better BUG=chromium:566801 R=lushnikov@chromium.org,dgozman@chromium.org

Patch Set 1 #

Total comments: 6

Patch Set 2 : another approach #

Patch Set 3 : better styles #

Patch Set 4 : show inline breakpoints in selected code #

Patch Set 5 : behind experiment #

Patch Set 6 : fixed tests #

Patch Set 7 : always show inline locations when script is here #

Patch Set 8 : bring back _shouldIgnoreExternalBreakpointEvents #

Patch Set 9 : .. #

Patch Set 10 : fixed context menu items for gutter #

Total comments: 12

Messages

Total messages: 6 (0 generated)
lushnikov
https://codereview.chromium.org/2500493003/diff/1/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js File third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js (left): https://codereview.chromium.org/2500493003/diff/1/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js#oldcode331 third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js:331: if (this._supportsEnabledBreakpointsWhileEditing() || this._scriptFileForTarget.size) where did this go? https://codereview.chromium.org/2500493003/diff/1/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js ...
4 years, 1 month ago (2016-11-11 19:56:01 UTC) #1
kozy
Uploaded another approach, ready for review. Please take a look.
4 years, 1 month ago (2016-11-14 17:57:25 UTC) #2
kozy
Dmitry and Andrey, please take a look! It's definitely ready for review. Screenshots are in ...
4 years, 1 month ago (2016-11-15 17:27:02 UTC) #3
lushnikov
https://codereview.chromium.org/2500493003/diff/180001/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js File third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js (right): https://codereview.chromium.org/2500493003/diff/180001/third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js#newcode563 third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js:563: _updateBreakpointDecoration(lineNumber) { _updateBreakpointDecorations
4 years, 1 month ago (2016-11-15 22:42:33 UTC) #4
dgozman
Exciting! Let's add a lot of tests :-) https://codereview.chromium.org/2500493003/diff/180001/third_party/WebKit/Source/devtools/front_end/bindings/BreakpointManager.js File third_party/WebKit/Source/devtools/front_end/bindings/BreakpointManager.js (right): https://codereview.chromium.org/2500493003/diff/180001/third_party/WebKit/Source/devtools/front_end/bindings/BreakpointManager.js#newcode256 third_party/WebKit/Source/devtools/front_end/bindings/BreakpointManager.js:256: breakpoints ...
4 years, 1 month ago (2016-11-15 23:35:13 UTC) #5
lushnikov
4 years, 1 month ago (2016-11-17 04:31:50 UTC) #6
https://codereview.chromium.org/2500493003/diff/180001/third_party/WebKit/Sou...
File third_party/WebKit/Source/devtools/front_end/bindings/BreakpointManager.js
(right):

https://codereview.chromium.org/2500493003/diff/180001/third_party/WebKit/Sou...
third_party/WebKit/Source/devtools/front_end/bindings/BreakpointManager.js:365:
breakpontLocationsForLineNumber(uiSourceCode, lineNumber) {
typo: breakpointLocationsForLineNumber

https://codereview.chromium.org/2500493003/diff/180001/third_party/WebKit/Sou...
File
third_party/WebKit/Source/devtools/front_end/source_frame/SourcesTextEditor.js
(left):

https://codereview.chromium.org/2500493003/diff/180001/third_party/WebKit/Sou...
third_party/WebKit/Source/devtools/front_end/source_frame/SourcesTextEditor.js:172:
addBreakpoint(lineNumber, disabled, conditional) {
nice to get rid of these! thanks

https://codereview.chromium.org/2500493003/diff/180001/third_party/WebKit/Sou...
File
third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js
(right):

https://codereview.chromium.org/2500493003/diff/180001/third_party/WebKit/Sou...
third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js:602:
.then(addMissingBreakpoints.bind(this, lineNumber));
what if during this asynchronous code the breakpoint gets removed? (fast
double-click in gutter)

https://codereview.chromium.org/2500493003/diff/180001/third_party/WebKit/Sou...
third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js:626:
function addMissingBreakpoints(lineNumber, locations) {
addInlineBreakpoints

https://codereview.chromium.org/2500493003/diff/180001/third_party/WebKit/Sou...
third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js:658:
Common.UIString('Add conditional breakpoint…'),
this._editBreakpointCondition.bind(this, breakpoint.lineNumber(), breakpoint));
nit: let's use \u... for the ellipsis

https://codereview.chromium.org/2500493003/diff/180001/third_party/WebKit/Sou...
third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js:661:
() => { breakpoint.setCondition('false'); breakpoint.setEnabled(true); });
It would be easier for me to read if the function is extracted

https://codereview.chromium.org/2500493003/diff/180001/third_party/WebKit/Sou...
third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js:664:
Common.UIString('Edit breakpoint…'),
let's use \u... for the ellipsis

https://codereview.chromium.org/2500493003/diff/180001/third_party/WebKit/Sou...
third_party/WebKit/Source/devtools/front_end/sources/JavaScriptSourceFrame.js:1159:
var maximumBreakpointsAmount =
Runtime.experiments.isEnabled('inlineBreakpoints') ? locations.length : 1;
let's make the experiment check simpler:

if (Runtime.experiments.isEnabled('inlineBreakpoints')) {
   for (...)
} else {
   ...
}

This way it's easier to drop/release experiment.

https://codereview.chromium.org/2500493003/diff/180001/third_party/WebKit/Sou...
File third_party/WebKit/Source/devtools/front_end/text_editor/cmdevtools.css
(right):

https://codereview.chromium.org/2500493003/diff/180001/third_party/WebKit/Sou...
third_party/WebKit/Source/devtools/front_end/text_editor/cmdevtools.css:108:
clip-path: polygon(0% 0%, 60% 0%, 100% 50%, 60% 100%, 0% 100%);
FYI: it's easy to insert UI.Icon instances in editor in case you need more
flexibility

Powered by Google App Engine
This is Rietveld 408576698