Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8138239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:25:46+00:00 2026-06-06T11:25:46+00:00

When I click a button in my app a series of Javascript code is

  • 0

When I click a button in my app a series of Javascript code is executed, in this particular case, I click on a “Cancel” button to close the currently open modal window. This close button looks like this on HTML:

<a class="cancel close">Cancel</a>

What I need is a way to track what is “triggered” by the action of clicking this <a> element in Javascript, without having to look into .js files for a reference to this DOM element (where the event was binded to the <a> element).

Is there a way of creating some sort of breakpoint in Javascript after a user generates an event but I don’t know where that Javascript code is? In order to actually find where that code is.

I’m using Google Chrome/Developer Tools for debugging Javascript.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T11:25:48+00:00Added an answer on June 6, 2026 at 11:25 am

    Open the developer console; switch to the scripts tab; click in the left-hand margin (on the line number) to set a breakpoint. The script’s execution will pause at the breakpoint, and you can inspect the call stack, local variables, and so on.

    Or, you can click “Pause”, before you trigger an event, and script execution will pause (like setting a global breakpoint) as soon as a script is about to execute, and show you the code. Then you can resume, step over, step into, or step out of the current function/expression.

    You can do that in Firebug and the built-in consoles in Safari, Chrome, Opera and IE.

    Edit: I should add, that the pause-button is less useful if you have javascript-driven animations, ajax polling, or other code being called with an interval, since the pause button stops any script execution until you click resume. So it’ll pause when, say, an animation’s update function is called, probably way before you have a chance to trigger the code you’re interested it.

    However, in there’s also “Break on exceptions” and “Break on uncaught exceptions” option in most (if not all) developer consoles. Like the pause button, it’s like having a global breakpoint, except it only stops when there’s trouble. So if the code you’re trying to find is causing errors or throwing exceptions, you can set the debugger to pause the script when that happens.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my Swing app, users can click a button to open a dialog panel
I have code like this. I click on button and it works only few
I am making the qr-code reader app,on button click i have opened the camera
I added a view with app delegate class's button click. Like this: In UnifeyeMobile_templateAppDelegate.mm
I have an app that when I click a button loads a new TabItem
I need a function that a user can just click a flash app button
I'm in the midst of writing a slide show app (click a button, and
Hello StackOverflow'ers, I have a (flex) app that, on the click of a button,
In my app there is a button, user just click it then the latest
when i click a button my app should be terminated. It must not to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.