VS 2019 script tags (in cshtml) "Go to definition" doesn't work, but in VS 2015 it works.
//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........."
The Visual Studio development team like to stress using the "Search Visual Studio (Ctrl-Q)" to find options.
Bring up your keyboard mapping and make sure the Edit.GoToDefinition is mapped to F12 for example.
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. I am running VS2019 16.1.0 Preview 2.0.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.