Devs with AWE have some interesting tools to make their job easy
To debug the server-side of a web application project, we usually work with the IDE (Netbeans, Eclipse, IntelliJ, Visual Studio Code) embedded debugger. This guide will show you how to debug in Eclipse
To start the server in debug mode we can right click on the server, and pick the debug option.
We can add a breakpoint anywhere in the code by right clicking at the side, and choosing toggle/add breakpoint.
For more information about debugging see eclipse documentation:
- Visual Studio Code
We can see the information flow between the server and the client by pressing F12 key and entering the network tab. There are a few useful options there but we will focus on the WS (WebSocket)
In the following example the interactions between the server and the client are displayed, and we can search through the JSON structure to see all the information and variables.
We can see the action that the server sent to the client, in this case is a type fill action with the parameters attached to it
Angular JS Batarang
Angular JS Batarang is an extension for browsers that adds tools for debugging and profiling AngularJS applications.
Angular JS Batarang Chrome extension
We can select a window element by clicking the inspect option to see all the scope information regarding only that element. In chrome the option is the following:
In this example, we select a grid containing users information. Between all the options we can see the
controller info, like the grid attributes, variable types...
It is also interesting to see the
model option, as it contains the data itself.
To search through the server logs we can use the tools Eclipse provides. Once the server is running, the logs will appear in the Console tab. Every action that the server executes will be displayed here, such as the SQL queries.
In the following example we have a grid that displays information from the users table, and a criteria that filters that grid by executing a SQL query attached to it:
Once we hit the search button, the server will execute the SQL query, and the console log will display it:
In this case we can see the date and time that the action was executed as well as the user, the screen, the query ID, and the full SQL query.
To search through the browser console, press the F12 key, and click on the Console tab.
In this tab we can look at actions taking place at the client side, along with the elapsed times they take and the parameters sent to the server. In this example there is a fill action, used to fill a grid with query data.
In the following example we have a grid, and a view button with a dependency attached to it. The dependency checks if the number of selected rows is not equal to 1. If the condition is true, the view button is hidden. Otherwise the button is activated.
As only one row is selected, the condition result is false, therefore, the button is not hidden.