是否可以在 Visual Studio 中跨 Javascript 文件启用 f12 或 查找所有引用?我正在使用 requireJS 在我的 SPA 中注册 js 文件.我也在使用 BackboneJS.
Is there anyway to enable f12 or find all references across Javascript files in Visual Studio? I'm using requireJS to register the js files in my SPA. I'm using BackboneJS as well.
有什么技巧可以像我使用 C#/.net 代码一样在 Visual Studio 中翻阅相关代码?我在网上搜索并调查了自己,但找不到任何东西.
Any tips for flipping through relavent code in Visual Studio like I can with C#/.net code? I've searched around online and investigated myself but couldn't find anything.
谢谢
要启用 F12 导航到另一个 .js 文件中定义的 JS 函数源,您需要将以下行添加到您引用的当前 .js 文件的顶部外部函数:
to enable F12 navigation to JS function source defined in another .js file you need to add the following line to the top of the current .js file where you reference the external function:
/// <reference path="../Path/To/The/Referenced/file.js" />
../部分是可选的,只需自己构建正确的路径即可.添加上述块后,Visual Studio 在 F12 击中其引用时成功找到外部 js 函数的定义.至少它适用于 VS2013 Premium.
The ../ part is optional, just build the correct path yourself. After the above chunk is added Visual Studio successfully finds the definition of the external js function upon F12 hit on its reference. At least it works for me with VS2013 Premium.
这篇关于在 Visual Studio 中调试/导航 JS 代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
discord.js v12:我如何等待 DM 频道中的消息?discord.js v12: How do I await for messages in a DM channel?(discord.js v12:我如何等待 DM 频道中的消息?)
如何让我的机器人提及发出该机器人命令的人how to make my bot mention the person who gave that bot command(如何让我的机器人提及发出该机器人命令的人)
如何修复必须使用导入来加载 ES 模块 discord.jsHow to fix Must use import to load ES Module discord.js(如何修复必须使用导入来加载 ES 模块 discord.js)
如何列出来自特定服务器的所有成员?How to list all members from a specific server?(如何列出来自特定服务器的所有成员?)
Discord bot:修复“找不到 FFMPEG"Discord bot: Fix ‘FFMPEG not found’(Discord bot:修复“找不到 FFMPEG)
使用 discord.js 加入 discord 服务器时的欢迎消息Welcome message when joining discord Server using discord.js(使用 discord.js 加入 discord 服务器时的欢迎消息)