开发者

Javascript debugging - Show variables in use

开发者 https://www.devze.com 2022-12-18 19:28 出处:网络
Is there any way I can view the variables used in a javascript function without trawling through the code?

Is there any way I can view the variables used in a javascript function without trawling through the code?

Using javascript on a server so cant really install an app to debug, is there a javascript function i can use in s开发者_运维问答ome way?


Not unless the JavaScript implementation you're using has some extension that provides such a feature (browsers don't). JavaScript resolves identifiers inside a function using the scope chain; there's no single object that contains all the variables in scope, and the objects in the scope chain are inaccessible from code.

0

精彩评论

暂无评论...
验证码 换一张
取 消