Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS HTML debugging doesn't pickup breakpoint on function def lines #3727

Open
th3coop opened this issue Apr 3, 2019 · 0 comments
Open

JS HTML debugging doesn't pickup breakpoint on function def lines #3727

th3coop opened this issue Apr 3, 2019 · 0 comments
Assignees
Milestone

Comments

@th3coop
Copy link
Member

th3coop commented Apr 3, 2019

Steps to Reproduce

If you have an event handler that is only one line the debugger won't pickup breakpoints set on it. See examples below and not the // a breakpoint set here... comments.

Does NOT Work

<!DOCTYPE html>
<html>
<head>
    <title></title>
    <script>
        var clicker = () => {console.log("buyrger");document.getElementById("blah").innerHTML = "blaher";repeat();}; // a break point here is not detect and debugger does not stop
        var repeat = () => {console.log("yeah this does nothing.");};
    </script>
</head>
<body>
<button onclick="clicker();">click me</button>
<p id="blah"></p>
</body>
</html>

Works

<!DOCTYPE html>
<html>
<head>
    <title></title>
    <script>
        var clicker = () => {
            console.log("burger"); // a breakpoint here is detected and debugger stops
            document.getElementById("blah").innerHTML = "blaher";
            repeat();
        };
        var repeat = () => console.log("yeah this does nothing.");
    </script>
</head>
<body>
<button onclick="clicker();">click me</button>
<p id="blah"></p>
</body>
</html>
@th3coop th3coop added this to the 11.1.2 milestone Apr 3, 2019
@th3coop th3coop self-assigned this Apr 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant