Repository navigation
make the launch.json generation leaner - #618
Conversation
|
Adding Phillip Hoff (@philliphoff) as he owns the .NET Core debugging part of the code. |
|
The scaffolded launch configuration for Docker .NET Core debugging is fairly lean; it adds only the optional
That's not a bad idea, though multi-stage Dockerfiles (such as scaffolded by .NET Core tooling) could complicate that (as you'd want the last That said, the |
| request: 'attach', | ||
| remoteRoot | ||
| }]; | ||
| }); |
There was a problem hiding this comment.
For any new code added, we tend to avoid thenable in favor of async-await.
Debugging this code has seemed easier when the code is written as :
let remoteRoot = await vscode.window.showInputBox({ value: '/usr/src/app', prompt: 'Please enter your Docker remote root'});
return [{
name: 'Docker: Attach to Node',
type: 'node',
request: 'attach',
remoteRoot
}];
You would need to make the function async however, so I'll defer to Stephen Weatherford (@StephenWeatherford) whether requiring this standard is worth it here. :)
There was a problem hiding this comment.
Yes, please do convert. Also, please use ext.ui.showInputBox instead of vscode.window.showInputBox. Note that this will throw on user cancel, which I assume makes sense here?
There was a problem hiding this comment.
Thanks for the review and suggestions I have pushed a commit which takes care of this.
|
Phillip Hoff (@philliphoff) thanks for your reply. In the end I leave making this leaner and more simply to you since I do not know what are the biggest pain points that users face when setting up docker debugging. Let me know if there is something on the vscode side we can do to improve this. Just for reference what is the scaffolded launch configuration for Docker .NET? |
|
Is there something else that needs to be done on my end here? |
|
Isidor Nikolic (@isidorn) For reference, this is the scaffolded Docker .NET Core launch configuration: {
"name": "Docker: Launch .NET Core (Preview)",
"type": "docker-coreclr",
"request": "launch",
"preLaunchTask": "build",
"dockerBuild": {},
"dockerRun": {}
} |
|
Phillip Hoff (@philliphoff) I'm assuming you're signing off on this PR... Thx. |
Phillip Hoff (philliphoff)
left a comment
There was a problem hiding this comment.
Looks ok to me, though I'm less knowledgable about the Node debugging side of things versus the .NET Core debugging side.
|
Great thanks. Should I click the merge button or will you, not sure what is the procedure here. Thanks! |
|
Stephen Weatherford (@StephenWeatherford) Are you ok with the changes? |
fixes #612
This PR simplifies the generated
launch.jsonin the following ways:What still needs to be done imho:
/usr/src/appPlease enter your Docker remote rootis correct here, maybe WORKDIR instead of remote root.Stephen Weatherford (@StephenWeatherford) let me know what you think. Thanks a lot
fyi Chris Dias (@chrisdias)