cake-vs icon indicating copy to clipboard operation
cake-vs copied to clipboard

Can the debug option automatically attach to process

Open gep13 opened this issue 9 years ago • 6 comments

Since we are already in Visual Studio instance, can we skip this step:

image

gep13 avatar Sep 10 '16 20:09 gep13

I will still try and look into this, but there is at least one problem. Presently the task runner doesn't have any control over the actual execution phase: it just returns a list of tasks for Visual Studio to execute on our behalf. It looks like there might an avenue using the ITaskRunnerCommandService, but I haven't used it before.

Where would we stand on shipping without this?

agc93 avatar Sep 11 '16 03:09 agc93

I think that would be fine. I would see this as a longer term feature.

gep13 avatar Sep 11 '16 06:09 gep13

Given the process id and this code, you should be able to attach programmatically.

matkoch avatar Mar 06 '17 22:03 matkoch

Thanks @matkoch ! While that will work (and will be the avenue we use going forward), the major issue with the original design is that there's no way for the extension to call that code from the Task Runner at all. Once we provide the ITaskRunnerNode for our file, VS handles everything after that. We're looking into how better to approach this now.

agc93 avatar Mar 06 '17 22:03 agc93

@agc93 I guess either cake.exe should signal that somehow using IPC, or you could have another thread, that watches for processes of cake.exe. You could even find out, if it's a child process of the current VisualStudio.

matkoch avatar Mar 06 '17 22:03 matkoch

@matkoch While possible, going OOP from Visual Studio requires quite significant changes to how the extension is built, packaged and shipped so I'd prefer to avoid it if we can.

agc93 avatar Mar 06 '17 23:03 agc93