-
Notifications
You must be signed in to change notification settings - Fork 348
Closed
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug
Description
Describe the bug
It is not possible to hit breakpoints in HTML script blocks on code that executes on page load (e.g. code not in a function that will be triggered later by user action)
To Reproduce
repro html:
<html>
<body>
<script>
console.log('log outside a function');
function clickme() {
console.log('log inside a function');
};
</script>
<button onclick="clickme()">Click Me</button>
</body>
</html>repro launch.json
{
"configurations": [
{
"name": "Launch Chrome",
"request": "launch",
"type": "pwa-chrome",
"url": "http://localhost:5000",
"webRoot": "${workspaceFolder}",
"trace": {
"logFile": "C:/dev/repros/basic/log.txt"
}
}
]
}Steps:
- Launch the debug session with no breakpoints set
- Set a breakpoint on line 4 of the repro HTML above
console.log('log outside a function')(the breakpoint should bind) - refresh the page
- See that the breakpoint becomes unbound, and is not hit
Log File
log.txt
VS Code Version:
Version: 1.52.0-insider (user setup)
Commit: ac165d7f974d70212be80cb15eaecfc1fd20b21a
Date: 2020-11-30T17:36:25.607Z
Electron: 11.0.2
Chrome: 87.0.4280.63
Node.js: 12.18.3
V8: 8.7.220.24-electron.0
OS: Windows_NT x64 10.0.19042
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugIssue identified by VS Code Team member as probable bugIssue identified by VS Code Team member as probable bug
