[英]Visual Studio 2019 script tags (in cshtml) between (function,global variable) go to definition (F12) doesn't work
VS 2019 script tags (in cshtml) "Go to definition" doesn't work, but in VS 2015 it works. VS 2019脚本标签(在cshtml中)“转到定义”不起作用,但在VS 2015中起作用。
//javascript function in cshtml
<script>
function getSelectedItem()
{
var x = 100;
}
function onDetail()
{
var selectedItem = getSelectedItem(); //F12 go to definition doesn't work
windowResult.SelectedItem = selectedItem;
windowResult.Status = true;
}
</script>
//javascript global variable in cshtml
<script>
var _OperationType = 0;
var _FormType= 0;
function SetDefaultsParam()
{
var param = {};
param.Type= _OperationType; //F12 go to definition doesn't work
param.Formtype= _FormType;
param.MasterId = _MasterId;
}
</script>
Function or global variable in cshtml ( F12 ) "Go to definition" gives "Cannot navigate to the symbol........." cshtml( F12 )中的函数或全局变量“转到定义”给出“无法导航至符号.........”
The Visual Studio development team like to stress using the "Search Visual Studio (Ctrl-Q)" to find options. Visual Studio开发团队喜欢强调使用“搜索Visual Studio(Ctrl-Q)”来查找选项。
Bring up your keyboard mapping and make sure the Edit.GoToDefinition is mapped to F12 for example. 调出键盘映射,并确保例如将Edit.GoToDefinition映射到F12。
In testing, if the function is empty, it won't jump to it. 在测试中,如果该函数为空,则不会跳转到该函数。 But when I put in a line of code inside the function, F12 worked like a charm. 但是,当我在函数中放入一行代码时,F12就像一个魅力。 I am running VS2019 16.1.0 Preview 2.0. 我正在运行VS2019 16.1.0 Preview 2.0。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.