diff options
author | Jan-Simon Möller <jsmoeller@linuxfoundation.org> | 2020-10-14 13:26:09 +0200 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2020-10-14 11:28:17 +0000 |
commit | 93c1058794d8bdab19c49df6d402a40963be65ec (patch) | |
tree | ab893f78a3b9928cf409cd3b63f6129381e4f5aa /docs/ATTIC/3_Developer_Guides/4_X(cross)_Development_System:_User's_Guide/4_X(cross)_Development_System:_ Internals /3.4.4.3_xds-agent/3.4.4.3.4_Debug.md | |
parent | 11d46ac01cf2b4bbc2e8ffe9b70ca27783af0137 (diff) |
Added Documentation for Jellyfish
(rewrote majority of them and updated with minor changes)
(removed whitespaces, added contribution guide, corrected rcar-gen3 section 7, added aglsetup.h flags to hardware support, some minor changes)
Bug-AGL: [SPEC-3633]
Signed-off-by: Shankho Boron Ghosh <shankhoghosh123@gmail.com>
Change-Id: Ifd6b3c1cdaa41f05a74c1affe6db9e24763921b9
Reviewed-on: https://gerrit.automotivelinux.org/gerrit/c/AGL/documentation/+/25411
Reviewed-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Tested-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
Diffstat (limited to 'docs/ATTIC/3_Developer_Guides/4_X(cross)_Development_System:_User's_Guide/4_X(cross)_Development_System:_ Internals /3.4.4.3_xds-agent/3.4.4.3.4_Debug.md')
-rw-r--r-- | docs/ATTIC/3_Developer_Guides/4_X(cross)_Development_System:_User's_Guide/4_X(cross)_Development_System:_ Internals /3.4.4.3_xds-agent/3.4.4.3.4_Debug.md | 132 |
1 files changed, 0 insertions, 132 deletions
diff --git a/docs/ATTIC/3_Developer_Guides/4_X(cross)_Development_System:_User's_Guide/4_X(cross)_Development_System:_ Internals /3.4.4.3_xds-agent/3.4.4.3.4_Debug.md b/docs/ATTIC/3_Developer_Guides/4_X(cross)_Development_System:_User's_Guide/4_X(cross)_Development_System:_ Internals /3.4.4.3_xds-agent/3.4.4.3.4_Debug.md deleted file mode 100644 index 7842741..0000000 --- a/docs/ATTIC/3_Developer_Guides/4_X(cross)_Development_System:_User's_Guide/4_X(cross)_Development_System:_ Internals /3.4.4.3_xds-agent/3.4.4.3.4_Debug.md +++ /dev/null @@ -1,132 +0,0 @@ -<!-- WARNING: This file is generated by fetch_docs.js using /home/boron/Documents/AGL/docs-webtemplate/site/_data/tocs/devguides/master/xds-docs-guides-devguides-book.yml --> - -# Debugging - -## XDS agent architecture - -The agent part is written in *Go* and the webapp / dashboard is in *typescript + Angular4*. - -```bash -| -+-- bin/ where xds-server binary file will be built -| -+-- conf.d Linux configuration and startup files (systemd user service) -| -+-- glide.yaml Go package dependency file -| -+-- lib/ sources of server part (Go) -| -+-- main.go main entry point of of Web server (Go) -| -+-- Makefile makefile including -| -+-- README.md readme -| -+-- scripts/ hold various scripts used for installation or startup -| -+-- tools/ temporary directory to hold development tools (like glide) -| -+-- vendor/ temporary directory to hold Go dependencies packages -| -+-- webapp/ source client basic webapp / dashboard -``` - -## Debug xds-agent (Go code) - -Install first [Visual Studio Code](https://code.visualstudio.com/) and -[Go plugin](https://marketplace.visualstudio.com/items?itemName=lukehoban.Go) -(`ext install lukehoban.Go`) - -Visual Studio Code launcher settings can be found into `.vscode/launch.json`. -The important think is to correctly set `GOPATH` in launch.json in order to -build xds-agent and debug it within Visual Studio Code. - -Here is an example of launch.json: - -```json -{ - "version": "0.2.0", - "configurations": [{ - "name": "XDS-Agent", - "type": "go", - "request": "launch", - "mode": "debug", - "remotePath": "", - "port": 2345, - "host": "127.0.0.1", - "program": "${workspaceRoot}", - "env": { - "GOPATH": "${workspaceRoot}/../../../../../..:${env:GOPATH}", - }, - "args": ["-log", "debug", "-c", "__agent-config_local_dev.json"], - "showLog": false - } - ] -} -``` - -And `__agent-config_local_dev.json` file content is as follow : - -```json -{ - "webAppDir": "./webapp/dist", - "logsDir": "${HOME}/tmp/xds-agent/logs", - "xdsServers": [ - { - "url": "http://localhost:8000" - } - ], - "syncthing": { - "binDir": "./bin", - "home": "${HOME}/tmp/xds_local_dev/syncthing-config", - "gui-address": "http://localhost:8386", - } -} -``` - -### Tricks to debug both xds-agent and xds-server - -To debug both `xds-agent` and `xds-server` or common code `xds-common`, it may -be useful use the same local sources. - -A trick to do that is to replace `xds-server` + `xds-common` in `vendor` -directory by a symlink that points to local sources. - -So clone first `xds-server` + `xds-common` sources next to `xds-agent` directory. - -You should have the following tree: - -```bash -tree -L 5 src/ -src/ -`-- gerrit.automotivelinux.org - `-- gerrit - `-- src - `-- xds - |-- xds-agent - |-- xds-common - `-- xds-server -``` - -Then invoke `vendor/debug` Makefile rule to create symbolic links inside vendor -directory : - -```bash -cd src/gerrit.automotivelinux.org/gerrit/src/xds/xds-agent -make vendor/debug -``` - -## Debug dashboard part (Typescript / angular code) - -Start `xds-agent` either from command line or in debug mode (see previous -chapter) and in another terminal start a watcher daemon so that type typescript -sources of webapp / dashboard are automatically "transpiled" using following -command : - -```bash -cd webapp -npm run watch -``` - -Then open the XDS Dashboard page ([http://localhost:8800](http://localhost:8800)) -and open the developer tool of web browser (for example `Ctrl+Shift+I` in Chrome). |