Skip to content

Commit 0d49a1e

Browse files
authored
Merge pull request #56 from Gid733/master
Added debugging section
2 parents c498a69 + b5e19da commit 0d49a1e

File tree

1 file changed

+33
-3
lines changed

1 file changed

+33
-3
lines changed

README.md

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,39 @@ You need to create an account for Microting API and get your access credentials.
2020

2121
## Development recommendations
2222

23-
- Visual Studio 2015
24-
- MS SQL Server Management Studio
25-
- Node.js
23+
To work with back-end use <a href="https://www.visualstudio.com/vs/community/">**Visual Studio 2017 Community edition**</a>.
24+
25+
To work with Angular front-end code recommended to use <a href="https://www.jetbrains.com/webstorm/">**WebStorm**</a> or <a href="https://code.visualstudio.com">**VS Code**</a>. If you're going to use VS Code you're need to install several plugins.
26+
27+
1. <a href="https://marketplace.visualstudio.com/items?itemName=johnpapa.angular-essentials"> Angular Essentials</a> - for Angular intellisense.
28+
2. <a href="https://marketplace.visualstudio.com/items?itemName=Mikael.Angular-BeastCode">Angular Snippets</a> - for Angular snippets.
29+
3. <a href="https://marketplace.visualstudio.com/items?itemName=johnpapa.angular-essentials"> Angular Language Service</a>
30+
4. <a href="https://augury.angular.io/"> Chrome Augury extention</a> - to observe variables and changes in a real time.
31+
32+
After installing, run **cmd** navigate to front-end **eform-client** folder and type **npm i**, after that **npm start**. This will start **Webpack** development server that will reload on any change in the front-end code.
33+
34+
There is two ways how to debug Angular application.
35+
First way is to put breakpoints in the **Sources**. To do that Open **Chrome Dev Tools** and then navigate to **Sources** tab. Go down and open **webpack://** tab from left panel. After that open tab with *disk_name:/app_folder/eform-client* (for example *C:/Users/MyUser/eForm/eform-client/*). Here you will see an entire application as you see it in **VS Code** and put a **debugger** where you're need it.
36+
The second way is simple, you can just put a **debugger** word dirrectly in code. After that app will reload and with open **Chrome Dev Tools** on the function call **debugger** will be triggered.
37+
For example **debugger** will be triggered on click *Logout* button:
38+
39+
```
40+
logout(): Observable<any> {
41+
debugger;
42+
return this.post(AuthMethods.Logout, {});
43+
}
44+
```
45+
46+
To use **Augury** go to **Chrome Dev Tools** and navigate to this tab.
47+
The component tree displays a hierarchical relationship of the components. When a component is selected, Augury presents additional information about the selected component.
48+
49+
1) View Source — a link to the source code of the component.
50+
2) Change Detection — displays whether or not Change Detection is in use for the component.
51+
3) Object Properties — lists the properties of the component.
52+
4) Dependencies - lists the dependencies of the component.
53+
54+
To view the source code of the selected component, click the **View Source** link. This will bring the **Sources** tab into focus and display the source code.
55+
The major feature of Augury is the Router Tree, which displays the routing information for the application. The **Router Tree** tab is located next to the **Component Tree** tab along the top left side.
2656

2757

2858
## Installation

0 commit comments

Comments
 (0)