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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js

Issue 2696253002: [DevTools] Introduced async step into scheduled function call (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js b/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
index 6b477d62f39d0f4744ffa42f94a23b9602f223b9..88b613eb450ce59cb285a8df3504317352aa1596 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/SourcesPanel.js
@@ -46,6 +46,8 @@ Sources.SourcesPanel = class extends UI.Panel {
/** @type {!UI.Action }*/ (UI.actionRegistry.action('debugger.step-over'));
this._stepIntoAction =
/** @type {!UI.Action }*/ (UI.actionRegistry.action('debugger.step-into'));
+ this._stepIntoAsyncAction =
+ /** @type {!UI.Action }*/ (UI.actionRegistry.action('debugger.step-into-async'));
this._stepOutAction = /** @type {!UI.Action }*/ (UI.actionRegistry.action('debugger.step-out'));
this._toggleBreakpointsActiveAction =
/** @type {!UI.Action }*/ (UI.actionRegistry.action('debugger.toggle-breakpoints-active'));
@@ -472,26 +474,28 @@ Sources.SourcesPanel = class extends UI.Panel {
_updateDebuggerButtonsAndStatus() {
var currentTarget = UI.context.flavor(SDK.Target);
var currentDebuggerModel = SDK.DebuggerModel.fromTarget(currentTarget);
+ var details = currentDebuggerModel ? currentDebuggerModel.debuggerPausedDetails() : null;
if (!currentDebuggerModel) {
this._togglePauseAction.setEnabled(false);
this._stepOverAction.setEnabled(false);
this._stepIntoAction.setEnabled(false);
+ this._stepIntoAsyncAction.setEnabled(false);
this._stepOutAction.setEnabled(false);
} else if (this._paused) {
this._togglePauseAction.setToggled(true);
this._togglePauseAction.setEnabled(true);
this._stepOverAction.setEnabled(true);
this._stepIntoAction.setEnabled(true);
+ this._stepIntoAsyncAction.setEnabled(details && details.auxData && details.auxData['stepIntoAsyncAvailable']);
this._stepOutAction.setEnabled(true);
} else {
this._togglePauseAction.setToggled(false);
this._togglePauseAction.setEnabled(!currentDebuggerModel.isPausing());
this._stepOverAction.setEnabled(false);
this._stepIntoAction.setEnabled(false);
+ this._stepIntoAsyncAction.setEnabled(false);
this._stepOutAction.setEnabled(false);
}
-
- var details = currentDebuggerModel ? currentDebuggerModel.debuggerPausedDetails() : null;
this._debuggerPausedMessage.render(details, Bindings.debuggerWorkspaceBinding, Bindings.breakpointManager);
}
@@ -604,40 +608,35 @@ Sources.SourcesPanel = class extends UI.Panel {
debuggerModel.resume();
}
- /**
- * @return {boolean}
- */
_stepOver() {
var debuggerModel = this._prepareToResume();
if (!debuggerModel)
- return true;
-
+ return;
debuggerModel.stepOver();
- return true;
}
- /**
- * @return {boolean}
- */
_stepInto() {
var debuggerModel = this._prepareToResume();
if (!debuggerModel)
- return true;
-
+ return;
debuggerModel.stepInto();
- return true;
}
- /**
- * @return {boolean}
- */
- _stepOut() {
+ _stepIntoAsync() {
var debuggerModel = this._prepareToResume();
if (!debuggerModel)
- return true;
+ return;
+ var details = debuggerModel.debuggerPausedDetails();
+ if (!details || !details.auxData || !details.auxData['stepIntoAsyncAvailable'])
+ return;
+ debuggerModel.stepIntoAsync();
+ }
+ _stepOut() {
+ var debuggerModel = this._prepareToResume();
+ if (!debuggerModel)
+ return;
debuggerModel.stepOut();
- return true;
}
/**
@@ -683,6 +682,7 @@ Sources.SourcesPanel = class extends UI.Panel {
debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._stepOverAction));
debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._stepIntoAction));
+ debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._stepIntoAsyncAction));
debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._stepOutAction));
debugToolbar.appendSeparator();
debugToolbar.appendToolbarItem(UI.Toolbar.createActionButton(this._toggleBreakpointsActiveAction));
@@ -1254,6 +1254,9 @@ Sources.SourcesPanel.DebuggingActionDelegate = class {
case 'debugger.step-into':
panel._stepInto();
return true;
+ case 'debugger.step-into-async':
+ panel._stepIntoAsync();
+ return true;
case 'debugger.step-out':
panel._stepOut();
return true;

Powered by Google App Engine
This is Rietveld 408576698