Issue metadata
Sign in to add a comment
|
Global variables are not accessible in console
Reported by
suryatej...@gmail.com,
Sep 11 2016
|
||||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:47.0) Gecko/20100101 Firefox/47.0 Steps to reproduce the problem: Please see the below jsfiddle. https://jsfiddle.net/Loadv0mo/ I had created a global variable named as global1 and have a break point just before the console.log and when I try to access the variable through the console in developer tools, I get the error message "VM674:1 Uncaught ReferenceError: global1 is not defined(…)" https://jsfiddle.net/Loadv0mo/1/ In this fiddle, when I try to access the same variable then I don't have any issues. Global variable should be available in the developer console. What is the expected behavior? We need to access the global variables in the developer console. What went wrong? we aren't able to access the global variables in the developer console. Did this work before? N/A Chrome version: <Copy from: 'about:version'> Channel: stable OS Version: OS X 10.11 Flash Version: Shockwave Flash 21.0 r0 Feel free to reach out to me for any other clarifications. |
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 by paulir...@chromium.org
, Sep 12 2016Components: Platform>DevTools>JavaScript
Mergedinto: 498454
Status: Duplicate (was: Unconfirmed)
technically this is not a global, as jsfiddle is wrapping things in window.onload=function(){ ... } but that said, the difference is about access to a closure variable. this is a known bug and tracked by issue 498454 . I run into it myself. :/ Thanks for reporting.