tasks.json vs launch.json, and test #1206
Replies: 2 comments
-
Hi Go friends 👋 @connor4312 might provide guidance here |
Beta Was this translation helpful? Give feedback.
-
There's been quite some discussion on this in Python in microsoft/vscode-python#21845. The approach I took with testing in VS Code initially was to avoid adding additional config files, e.g. no debug-esque launch.json. The reasoning for this was that configuring launch.json is constantly a point for users, and many test runners already have their own configuration files available to configure them. For now the general approach is to use workspace settings: that's what Python does and also what I do in my own test extension for example. We may add some extra features here in the future, such as making tests configurable in the launch.json. Note that you could also source data from the launch.json (calling I don't anticipate changing how the test child process is owned at any point, because extensions have widely varying lifecycle needs. |
Beta Was this translation helpful? Give feedback.
-
Hi, I am the Go extension maintainer.
Our extension provides test functionalities by running the
go test
command (using the node.js child process) and presenting the results using the Test API.As users want more flexibilities and controls over how they run the command, I am investigating whether we can use VS Code Task API in running
go test
instead of working with node.js child process directly. Then, I hope users can offer their customization by defining a task in test group using their tasks.json, too.On the other hand, there is also
launch.json
. It is primarily for debugging and can carry debug-specific settings. But it also offers thenoDebug
option.Users often use
run test
anddebug test
features together. They expect the identical setup (except the debug-specific part) to be used when switching between them. Repeating the similar setting intasks.json
andlaunch.json
doesn't seem ideal.How do other language&frame extensions handle test&debug configurations? Do they use
tasks.json
orlaunch.json
for test configuration? Or do they define extension configuration instead?Beta Was this translation helpful? Give feedback.
All reactions