Forum Discussion

Reza_Ameri's avatar
Reza_Ameri
Silver Contributor
Feb 28, 2023

Manage and Debug JavaScript codes

Hi all,

 

As we all know manage and debug of JavaScript is a challenge. We don't have functionality in adding breaking points. It is case sensitive and small spell error or missing of braces cause errors. JavaScript is powerful but maintainability and security remains a great challenge. 

I believe a good recommended practice would be reduce using JavaScript as much as we can and focus more on turning on code into manageable functions. I would like to know your thoughts on this and what are best practices to maintain, manage and debug JavaScript in a .NET application?

4 Replies

  • Hi Reza_Ameri,
    Thanks for posting your issue here.

    Here you can manage and debug JavaScript code:

    Here is an overview of your problem,
    Use the console: The console is a powerful tool that can help you debug JavaScript code. Use 'console. log()' statements to print values and debug information to the console. Use breakpoints: Breakpoints allow you to pause the execution of your code at a specific point and inspect the values of variables and objects
    If you know about more this go through the below link:
    https://www.linkedin.com/pulse/best-practices-debugging-javascript-code-mohammad-shoeb-faizan/
    Best Regards,
    AddWebSolution
    • Reza_Ameri's avatar
      Reza_Ameri
      Silver Contributor
      I am familiar with console.log() and add breaking point and debug in developer tool. However, if you have experience working with C#, VB or similar code, you clearly understand what I mean by maintainability.
      • AddWebSolution's avatar
        AddWebSolution
        Brass Contributor

        Yes, maintainability is important, but it's not the only factor. Performance and efficiency are also crucial, especially in certain contexts. Striking the right balance between these aspects can be a challenge.

Resources