Skip to content
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

Simplify generated launch.json #612

Closed
3 tasks
isidorn opened this issue Nov 9, 2018 · 2 comments · Fixed by #618
Closed
3 tasks

Simplify generated launch.json #612

isidorn opened this issue Nov 9, 2018 · 2 comments · Fixed by #618

Comments

@isidorn
Copy link
Contributor

isidorn commented Nov 9, 2018

Hey,

VSCode dev here. This milestone I am looking into simplifing generated launch.json for various extensions microsoft/vscode#62851

The launch.json that docker generates is the following:

{
	// Use IntelliSense to learn about possible attributes.
	// Hover to view descriptions of existing attributes.
	// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
	"version": "0.2.0",
	"configurations": [
		{
			"name": "Docker: Attach to Node",
			"type": "node",
			"request": "attach",
			"port": 9229,
			"address": "localhost",
			"localRoot": "${workspaceFolder}",
			"remoteRoot": "/usr/src/app",
			"protocol": "inspector"
		}
	]
}

Here are my suggestions on how to simplify this:

  • Remove the protocol field, by default it is auto which should work fine
  • Remove the address and localRoot. Also contribute a DebugConifgurationProvider which will just resovle every launch configuration by appending the localRoot and address if they are not already present
  • Change the default for localRoot to be ${workspaceFolder}, not null as it is now (auto complete it in json)

By removing these unnecesry fields we will make it look simpler for the user, making him see only what is important to him.
Also what is the field that the user has to configure here the most? I would think it is the port and the remoteRoot. Would you profit from some quick pick which would ask the user which port he is using? Similar to your create a dockerfile experience?

All of this should be pretty straightforward. Please let me know if you need help.

@weinand
Copy link

weinand commented Nov 13, 2018

@isidorn setting "localRoot" to the default value "${workspaceFolder}" should be done in node-debug. For "address" node-debug already uses the default "localhost".
So there should be no need for vscode-docker to implement a DebugConfigurationProvider.

@StephenWeatherford
Copy link
Contributor

Adding @philliphoff as he owns the .NET Core debugging part of the code.

@vscodebot vscodebot bot locked and limited conversation to collaborators Feb 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants