-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support extension debugging in a clean environment #159572
Comments
With the "settings profile" feature and the new command line support for profiles it is now possible to specify profiles in the extension's debug configuration. There are basically two possible approaches:
This debug configuration shows how to "debug in a clean environment": {
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--profile-temp",
"--extensionDevelopmentPath=${workspaceFolder}",
"${workspaceFolder}/sampleWorkspace"
],
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "npm: watch"
} Please note: the configuration from above passes a workspace folder And here is a debug configuration for "debugging in a controlled environment" that uses a previously created "debug" profile: {
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--profile=debug",
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "npm: watch"
} |
With the fix for #159577 here is now an up-to-date description of the feature: With the "settings profile" feature and the new command line support for profiles it is now possible to specify profiles in the extension's debug configuration. There are basically two possible approaches:
This debug configuration shows how to "debug in a clean environment": {
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--profile-temp",
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "npm: watch"
} And here is a debug configuration for "debugging in a controlled environment" that uses a previously created "debug" profile: {
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--profile=debug",
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
"preLaunchTask": "npm: watch"
} Please note:
|
In order to develop and debug extensions in a "clean environment", that means with a clean (or empty) set of extensions and settings, some users tried to use the
--extensions-dir
and--user-data-dir
command line options in their extension's debug configuration.Since this does not work, issues #126737 and #130504 were created.
Fixing these issues is difficult and would result in large and high-risk code changes.
With the recent work on "settings profiles", a much simpler solution is in reach.
This feature request will make profiles available for extension debugging in a clean environment.
The text was updated successfully, but these errors were encountered: