Added support for debugging / breakpointing of the client side code via vscode and firefox

pull/2193/head
grbd 4 years ago
parent 383dfd3010
commit 1d4e8abe67

@ -1,5 +1,11 @@
{ {
"comments": true, "comments": true,
"env": {
"development": {
"sourceMaps": true,
"retainLines": true
}
},
"plugins": [ "plugins": [
"lodash", "lodash",
"graphql-tag", "graphql-tag",

@ -4,6 +4,7 @@
"dbaeumer.vscode-eslint", "dbaeumer.vscode-eslint",
"christian-kohler.path-intellisense", "christian-kohler.path-intellisense",
"mrmlnc.vscode-puglint", "mrmlnc.vscode-puglint",
"octref.vetur" "octref.vetur",
"firefox-devtools.vscode-firefox-debug"
] ]
} }

@ -3,19 +3,19 @@
// Hover to view descriptions of existing attributes. // Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0", "version": "0.2.0",
"compounds": [
{
"name": "Server / Client Debug",
"configurations": ["Launch Program", "Launch Firefox Client Debug"]
}
],
"configurations": [ "configurations": [
{
"type": "node",
"request": "attach",
"name": "Attach (Inspector Protocol)",
"port": 9229,
"protocol": "inspector"
},
{ {
"type": "node", "type": "node",
"request": "launch", "request": "attach",
"name": "Launch Program", "name": "Attach (Inspector Protocol)",
"program": "${workspaceRoot}\\server.js" "port": 9229,
"protocol": "inspector"
}, },
{ {
"type": "node", "type": "node",
@ -23,6 +23,25 @@
"name": "Attach to Port", "name": "Attach to Port",
"address": "localhost", "address": "localhost",
"port": 9222 "port": 9222
} },
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"program": "${workspaceRoot}\\server\\index.js"
},
{
"name": "Launch Firefox Client Debug",
"type": "firefox",
"request": "launch",
"url": "http://localhost:3000/",
"webRoot": "${workspaceRoot}",
"pathMappings": [
{
"url": "webpack:///client",
"path": "${workspaceRoot}/client"
}
]
},
] ]
} }

@ -23,6 +23,7 @@ fs.emptyDirSync(path.join(process.cwd(), 'assets'))
module.exports = { module.exports = {
mode: 'development', mode: 'development',
devtool: 'source-map',
entry: { entry: {
app: ['./client/index-app.js', 'webpack-hot-middleware/client'], app: ['./client/index-app.js', 'webpack-hot-middleware/client'],
legacy: ['./client/index-legacy.js', 'webpack-hot-middleware/client'], legacy: ['./client/index-legacy.js', 'webpack-hot-middleware/client'],

Loading…
Cancel
Save