Visual Studio 2022 Go to Definition not Working With JavaScript

Good Day!

I have very bad experience with Visual Studio 2022, Finally after I decide to move from 2015 to the newest version 2022 with the latest version of Devsense PHP Tools, A lot of bad situations start happening, begin with destroy all opened documents ordered over three monitors, some error messages while Go to Definition with PHP functions and classes and finally the worst at all, I can’t use Go to Definition or F12 with JavaScript code and really don’t know how to continue work with this, I have a huge JS files under namespaces and hundreds of functions.

I googled it and tried this solution “Tools > Options > Text Editor > JavaScript/TypeScript > Language Service > (CHECK) Disable dedicated syntax process (restart required)” but still can’t use F12.

I tried to remove the “ASP.NET and Web Development” from Visual Studio Installer and re-install it but doesn’t work.

I saw an article on Visual Studio Developers Community forum (here) and (here) and it seems like it has been fixed a long time ago.

Can anyone help?

After my test, I found that this phenomenon does exist. I created two JS files in the project:

main.js:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>var message = MyApp.Utilities.sayHello("World");
console.log(message);
var sum = MyApp.Utilities.addNumbers(5, 7);
console.log(sum);
</code>
<code>var message = MyApp.Utilities.sayHello("World"); console.log(message); var sum = MyApp.Utilities.addNumbers(5, 7); console.log(sum); </code>
var message = MyApp.Utilities.sayHello("World");
console.log(message);
var sum = MyApp.Utilities.addNumbers(5, 7);
console.log(sum);

app.js:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<code>var MyApp = MyApp || {};
MyApp.Utilities = {
sayHello: function (name) {
return "Hello, " + name + "!";
},
addNumbers: function (a, b) {
return a + b;
}
};
</code>
<code>var MyApp = MyApp || {}; MyApp.Utilities = { sayHello: function (name) { return "Hello, " + name + "!"; }, addNumbers: function (a, b) { return a + b; } }; </code>
var MyApp = MyApp || {};
MyApp.Utilities = {
    sayHello: function (name) {
        return "Hello, " + name + "!";
    },
    addNumbers: function (a, b) {
        return a + b;
    }
};

When I rebuild the solution and restart VS, the main.js content is displayed by default. No matter you click sayHello or addNumbers and use F12, you will not be redirected to the method defined in app.js. Even if you right-click sayHello or addNumbers and click go to definition, you will not be redirected to the method defined in app.js. The F12 go to definition function will only work when you click on the app.js file, load the content inside, and then return to main.js. This may be a bug in VS. If you find it troublesome to always open the JS file for method definition, I suggest you report this bug to DC. DC has many VS developers who should be able to help you.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật