Watch JavaScript function parameter value while debugging in chrome browser

Viewed 15

I do not have any option to update the javascripts loaded into the page by other applications. But I need to know the "flagDisplaySpecialButton" parameter value at runtime (debugging purpose only) when "showSpecialButton" function is called.

Is there any way to watch this variable while debugging in chrome browser?

async function showSpecialButton(flagDisplaySpecialButton) {
  const specialButton = document.getElementById('specialButtonWrapper');
  const isSpecialButtonEligible = true; //await getSpecialButtonEligibility();
  if (specialButton) {
    if (isSpecialButtonEligible && flagDisplaySpecialButton) {
      specialButton.hidden = false;
      return true;
    }
    specialButton.hidden = true;
    return false;
  }
  return false;
}

showSpecialButton(true); //called from different javascript files
<div id="specialButtonWrapper" hidden>
  <button id="specialButton">Special Button</button>
</div>

0 Answers
Related