You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -48,6 +45,58 @@ By default the hostname will be `localhost` and the default port is `9080`. You
48
45
49
46
The command will try to use the default port, if it is not available it will find an open port to use instead.
50
47
48
+
## Visual Studio Code Webpack Debugging Support (Source Maps)
49
+
50
+
To enable step-by-step debugging in Visual Studio Code for your webpacked code, you will have to add source map support by adding a [custom webpack config](https://developer.adobe.com/app-builder/docs/guides/configuration/webpack-configuration/).
51
+
52
+
In the root of your project, add a `webpack-config.js` file:
53
+
54
+
```javascript
55
+
module.exports = {
56
+
devtool: 'inline-source-map'
57
+
}
58
+
```
59
+
60
+
## TypeScript Support
61
+
62
+
Install these node modules in your app:
63
+
`npm install --save-dev ts-loader typescript`
64
+
65
+
In the root of your project, add a `webpack-config.js` file:
66
+
67
+
```javascript
68
+
module.exports = {
69
+
devtool: 'inline-source-map',
70
+
module: {
71
+
rules: [
72
+
{
73
+
// includes, excludes are in tsconfig.json
74
+
test: /\.ts?$/,
75
+
exclude: /node_modules/,
76
+
use: 'ts-loader'
77
+
}
78
+
]
79
+
}
80
+
}
81
+
```
82
+
83
+
In the root of your project, add a `tsconfig.json` file:
84
+
85
+
```json
86
+
{
87
+
"exclude": ["node_modules", "dist"],
88
+
"compilerOptions": {
89
+
"target": "ES6",
90
+
"module": "ES6",
91
+
"sourceMap": true
92
+
}
93
+
}
94
+
```
95
+
96
+
There is a Visual Studio Code issue with TypeScript and inspecting variables by hovering your mouse over them:
0 commit comments