In vscode I use the same launch.json
for each project where I only change url
:
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch Edge",
"request": "launch",
"type": "pwa-msedge",
"url": "http://localhost/test/${workspaceFolderBasename}/",
"webRoot": "${workspaceFolder}/",
"outputCapture": "console",
"sourceMaps": true,
"runtimeArgs": [
"--auto-open-devtools-for-tabs"
],
"env": {
"XDEBUG_MODE": "debug,develop",
"XDEBUG_CONFIG": "client_port=9000"
}
},
]
}
This works great, since each project gets its own independent profile in MS Edge. However, this also means, for each new project I have to manually tweak settings of devtools, install required extensions, etc.
Is there a way to modify "default" profile, so when vscoded creates new profile it would already contain all the tweaks, extensions, etc?
I'm using portable vcode on Windows, so all the profiles saved in .\data\user-data\User\workspaceStorage\**********\ms-vscode.js-debug\.profile
vcode creates that folder, but I'm not sure if it actually copies anything into there, or MS Edge itself creates fresh profile in there,
CodePudding user response:
with File Templates you can create a launch.json
and settings.json
that will be placed in the workspace .vscode
folder and they can contain snippets and variables.
##@@## ~w/.vscode/launch.json
{
"version": "0.2.0",
"configurations": [
// add your launch configs
]
}
I will add the possibility to have variables in the final file like ${workspaceFolder}
and not be replaced by the extension when instantiating a template.
CodePudding user response:
Based on your description, you can try to create default profile for each project, just use the argument --user-data-dir
. In your example, you just add this to runtimeArgs
.
But when you do not configure this parameter and the corresponding group policy, it will default to this path: C:\Users\<Current-user>\AppData\Local\Microsoft\Edge\User Data\Default
.
For more details, please refer to this doc: Create Microsoft Edge user data directory variables.