@alexr00 pls correct me if i'm wrong, but I think that it doesn't make sense to set a problem matcher for a task without output. Conceptually I agree with you, but @hediet use case makes sense:
Have a launch config that depends on some server running locally
Add a prelaunch task for the launch config
The prelaunch task must be a background task as it never exits as long as the server is running
Background prelaunch tasks must have a problem matcher in order to run
The prelaunch task doesn't actually output anything, just starts a server You could say that the task could be modified to output something just to satisfy the problem matcher. Or you could say that there's a new kind of prelaunch task that only requires that the task starts, not ever "ends" (or matches an end pattern in a problem matcher). Or you could say that this is a valid use case. I don't know how common it is. I do know that users have wanted to have prelaunch tasks that only require that the task start for a while.
7条答案
按热度按时间vd2z7a6w1#
@alexr00 pls correct me if i'm wrong, but I think that it doesn't make sense to set a problem matcher for a task without output.
llmtgqce2#
如果对于该任务我没有设置问题匹配器,那么该任务永远不会完成,依赖于它的启动配置也不会启动。
h43kikqp3#
如果将它设置为
[]
会发生什么?nwwlzxa74#
但是你也可以玩一下它——在vscode仓库中,任务是“启动Http服务器”。尝试启动“Monaco Editor Playground”的启动配置。
yhuiod9q5#
好的,下次迭代会尝试查看这个。
xzabzqsa6#
@alexr00 pls correct me if i'm wrong, but I think that it doesn't make sense to set a problem matcher for a task without output.
Conceptually I agree with you, but @hediet use case makes sense:
You could say that the task could be modified to output something just to satisfy the problem matcher. Or you could say that there's a new kind of prelaunch task that only requires that the task starts, not ever "ends" (or matches an end pattern in a problem matcher). Or you could say that this is a valid use case. I don't know how common it is. I do know that users have wanted to have prelaunch tasks that only require that the task start for a while.
p3rjfoxz7#
如果你有嵌入式系统,并启动一个像QEMU这样的模拟器,然后将调试器连接到它。启动模拟器是一个后台任务,但没有输出。现在你需要运行任务,然后再执行启动配置。