Expose the connection object, so the derivative class can revisit the…#267
Expose the connection object, so the derivative class can revisit the…#267roblourens merged 1 commit intomicrosoft:masterfrom
Conversation
|
Why do you need this? Do you need the attached target id, not the list of all target ids? |
|
"Do you need the attached target id" Yes |
|
So this won't work, because it will return all targets. You need to change the attach logic to make the selected target accessible. What's the use case? |
|
This PR only reflects the changes needed in chrome-core. My debug adapter will take care of the attach logic. It will call The code in my downstream debug adapter looks like this: |
|
I can't think of any other reason for needing the websocket url anyway. Maybe exposing the whole attached target object would be useful. But please tell me what your actual use case is, because I don't understand why you need this id. |
|
This id is used to call a API provided in EDP to close a tab. The API has the form of *:9222/json/close/{id} . Hence the id is used there. We can't just breakdown Edge process entirely like we do for Chrome due to different process model is used for each browser. I feel that dynamically retrieving the target is better than using the cached one. It's going to be a long time between the target is attached and when we need to use this id (debug finish). So far I am not sure whether edge is going to change any metadata of the target along the way. Even if the id might be fixated, I am not sure about the other metadata we might need to access along the way. |
|
Good point that it will change along the way. I thought of one thing that would actually be kind of cool - we could show the window title in the call stack (while debugging multiple targets) instead of just "Chrome". Anyway, could you just change it to expose the attached ITarget? |
|
Exposing as ITarget is better. Will do! |
789cafd to
345ef88
Compare
… targets as needed.
|
PTAL |
Expose the connection object, so the derivative class can revisit the targets as needed.
Currently the series of attach() method could not surface back the debugger id from the response of calling /json/list. Instead of refactoring the code and returning that, it might be cleaner to have the downstream logic query the targets again when needed.