diff --git a/src/test/unit/__snapshots__/window-console.test.js.snap b/src/test/unit/__snapshots__/window-console.test.js.snap index 688f29cff7..f52d898f52 100644 --- a/src/test/unit/__snapshots__/window-console.test.js.snap +++ b/src/test/unit/__snapshots__/window-console.test.js.snap @@ -13,11 +13,11 @@ Array [ | \\\\ / | | '_ \\\\| '__/ _ \\\\| _| | |/ _ \\\\ '_| |/ \\\\ _ / \\\\| | |_) | | | (_) | | | | | __/ | | | | .__/|_| \\\\___/|_| |_|_|\\\\___|_| - / - - \\\\ |_| - ,- V__V -. - -= __- * - .,=- - \`\\\\_ - _/ - \`-----' ", + / - - \\\\ |_| + ,- V__V -. + -= __- * - .,=- + \`\\\\_ - _/ + \`-----' ", "font-family: Menlo, monospace;", ], Array [ @@ -26,6 +26,7 @@ Array [ %cwindow.profile%c - The currently loaded profile %cwindow.filteredThread%c - The current filtered thread %cwindow.filteredMarkers%c - The current filtered and processed markers +%cwindow.selectedMarker%c - The selected processed marker in the current thread %cwindow.callTree%c - The call tree of the current filtered thread %cwindow.getState%c - The function that returns the current Redux state. %cwindow.selectors%c - All the selectors that are used to get data from the Redux state. @@ -66,6 +67,12 @@ The CallTree class's source code is available here: "", "font-weight: bold;", "", + "font-weight: bold;", + "", + "font-weight: bold;", + "", + "font-weight: bold;", + "", "font-style: italic; text-decoration: underline;", "", "font-style: italic; text-decoration: underline;", diff --git a/src/utils/window-console.js b/src/utils/window-console.js index 1fd4599b90..558fcdb7a1 100644 --- a/src/utils/window-console.js +++ b/src/utils/window-console.js @@ -61,6 +61,13 @@ export function addDataToWindowObject( }, }); + defineProperty(target, 'selectedMarker', { + enumerable: true, + get() { + return selectorsForConsole.selectedThread.getSelectedMarker(getState()); + }, + }); + target.experimental = { enableEventDelayTracks() { const areEventDelayTracksEnabled = dispatch( @@ -237,11 +244,11 @@ export function logFriendlyPreamble() { " | \\ / | | '_ \\| '__/ _ \\| _| | |/ _ \\ '_| ", ' |/ \\ _ / \\| | |_) | | | (_) | | | | | __/ | ', ' | | | .__/|_| \\___/|_| |_|_|\\___|_| ', - ' / - - \\ |_| ', - ' ,- V__V -. ', - ' -= __- * - .,=- ', - ' `\\_ - _/ ', - " `-----' ", + ' / - - \\ |_| ', + ' ,- V__V -. ', + ' -= __- * - .,=- ', + ' `\\_ - _/ ', + " `-----' ", ].join('\n'), 'font-family: Menlo, monospace;' ); @@ -253,6 +260,7 @@ export function logFriendlyPreamble() { %cwindow.profile%c - The currently loaded profile %cwindow.filteredThread%c - The current filtered thread %cwindow.filteredMarkers%c - The current filtered and processed markers + %cwindow.selectedMarker%c - The selected processed marker in the current thread %cwindow.callTree%c - The call tree of the current filtered thread %cwindow.getState%c - The function that returns the current Redux state. %cwindow.selectors%c - All the selectors that are used to get data from the Redux state. @@ -282,6 +290,9 @@ export function logFriendlyPreamble() { // "window.filteredMarkers" bold, reset, + // "window.selectedMarker" + bold, + reset, // "window.callTree" bold, reset, @@ -306,6 +317,12 @@ export function logFriendlyPreamble() { // "window.toggleTimelineType" bold, reset, + // "window.retrieveRawProfileDataFromBrowser" + bold, + reset, + // "window.saveToDisk" + bold, + reset, // "processed-profile-format.md" link, reset,