You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
is_client_connected() always returns True in Maya #332
By taking a look at the code I only envision something like that if the debugger is created more than once in the same process (since it should only return True after at least one configurationDone is sent to the debugger, since it's mostly a shortcut to pydevd._is_attached()).
Locally I couldn't reproduce the issue in a simple case (even when disconnecting the debugpy.is_client_connected() did seem to start returning False).
We've seen it return true early while debugging that Maya issue. I assumed that it was basically returning true as soon as the server gets a connection to the adapter (it would also explain why tests using it sporadically failed) - but if it actually waits for "configurationDone", that shouldn't be the case.
So, I guess this is probably related to #334 and #333 then.
It seems like one of the connections got through to some point and then as Maya probably keeps everything in memory subsequent attempts didn't work.
One thing I noted is that the report from the pydevd side to pydevd._is_attached() starts returning True only after the configurationDone request, but apparently it only becomes False in a disconnect request, so, it may be that one issue here is that if the connection is dropped without that signal, pydevd won't start returning the proper value there (should I take a look at that?)
It might be related, not sure. We kept reusing the same Maya instance at first, but then later realized that there might be some undesired caching going on, and restarted it for further repros... I think it was still giving True tho even after a restart.
#333 came out of that as well, yeah. I just wasn't sure one way or another, hence the issue says to check it, not that there's necessarily a problem.
I'll update the title to make this less confusing, and for now we can de-pri this, since it's a fairly narrow case if it's Maya-only.
Activity
int19h commentedon Jul 13, 2020
I believe this is the root cause of #166
fabioz commentedon Jul 16, 2020
Humm, I guess you have some specific scenario in mind as in a simple launch (without the initial debugger connection) it does seem to work for me...
i.e.: right now, if I start a launch to run the code below (without debugging in place):
it prints
Falseto me...By taking a look at the code I only envision something like that if the debugger is created more than once in the same process (since it should only return
Trueafter at least oneconfigurationDoneis sent to the debugger, since it's mostly a shortcut topydevd._is_attached()).Locally I couldn't reproduce the issue in a simple case (even when disconnecting the
debugpy.is_client_connected()did seem to start returningFalse).int19h commentedon Jul 16, 2020
We've seen it return true early while debugging that Maya issue. I assumed that it was basically returning true as soon as the server gets a connection to the adapter (it would also explain why tests using it sporadically failed) - but if it actually waits for "configurationDone", that shouldn't be the case.
fabioz commentedon Jul 17, 2020
So, I guess this is probably related to #334 and #333 then.
It seems like one of the connections got through to some point and then as Maya probably keeps everything in memory subsequent attempts didn't work.
One thing I noted is that the report from the
pydevdside topydevd._is_attached()starts returningTrueonly after theconfigurationDonerequest, but apparently it only becomesFalsein adisconnectrequest, so, it may be that one issue here is that if the connection is dropped without that signal,pydevdwon't start returning the proper value there (should I take a look at that?)int19h commentedon Jul 17, 2020
It might be related, not sure. We kept reusing the same Maya instance at first, but then later realized that there might be some undesired caching going on, and restarted it for further repros... I think it was still giving True tho even after a restart.
#333 came out of that as well, yeah. I just wasn't sure one way or another, hence the issue says to check it, not that there's necessarily a problem.
I'll update the title to make this less confusing, and for now we can de-pri this, since it's a fairly narrow case if it's Maya-only.
[-]is_client_connected always returns true [/-][+]is_client_connected() always returns True in Maya[/+]