app
directory ... why not combine the two?├── app
│ ├── src
│ │ ├── Component.ts
│ │ ├── control
│ │ │ └── *.ts
│ │ ├── controller
│ │ │ └── App.controller.ts
│ │ ├── i18n
│ │ │ └── ..
│ │ ├── img
│ │ │ └── ..
│ │ ├── index.html
│ │ ├── manifest.json
│ │ └── view
│ │ └── App.view.xml
│ ├── tsconfig.json
│ ├── ui5.yaml
│ └── webapp
│ ├── ..
│ └── ..
├── db
├── lib
│ ├── ..
│ └── ..
├── srv
│ ├── *.cds
│ └── *.js
└── test
├── ..
└── ..
$> yo easy-ui5 ts-app
copied into the /app
folder of the CAP project.cds
runtime debugging$> cds run
will boot up the entire project - but issuing the same command in VS Code's JavaScript debug terminal
......will actually attach Node.js
's debugger to the cds
runtime!
$> cds run
Debugger attached. # <-- yes!
[cds] - Loading server from { file: './srv/server.js' }
[cds] - model loaded from 1 file(s):
# ...
cds
runtime halt on any breakpoint set in VS Code!But not only that, cds
will also per convention pick up both the TypeScript- and the transpiled sources....ts
→ .js
happens via the predefined babel
-based npm script
from the "easy UI5" ts-app
-generator)Node.js
-debugger is already attached, a VS Code debug configuration in .vscode/launch.json
can be used to also create a debugging session for the UI5 TypeScript sources:{
"version": "0.2.0",
"configurations": [
{
"type": "chrome", // this also works with MS edge: "pwa-edge"
"request": "launch",
"name": "app debug",
"url": "http://localhost:4004/webapp",
"webRoot": "${workspaceFolder}/app/webapp",
"sourceMaps": true,
"disableNetworkCache": true,
"showAsyncStacks": true
}
]
}
.js
files back to their .ts
counterparts.You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
9 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |