mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
Send both "ptvsd" and "debugpy" telemetry events for smooth transition.
This commit is contained in:
parent
a1e4eb3c5e
commit
367ff72788
2 changed files with 29 additions and 9 deletions
|
|
@ -77,6 +77,16 @@ class IDE(components.Component, sockets.ClientConnection):
|
|||
session.ide = self
|
||||
session.register()
|
||||
|
||||
# For the transition period, send the telemetry events with both old and new
|
||||
# name. The old one should be removed once the new one lights up.
|
||||
self.channel.send_event(
|
||||
"output",
|
||||
{
|
||||
"category": "telemetry",
|
||||
"output": "ptvsd",
|
||||
"data": {"packageVersion": debugpy.__version__},
|
||||
},
|
||||
)
|
||||
self.channel.send_event(
|
||||
"output",
|
||||
{
|
||||
|
|
|
|||
|
|
@ -149,9 +149,7 @@ class Session(object):
|
|||
"""
|
||||
|
||||
self.log_dir = (
|
||||
None
|
||||
if log.log_dir is None
|
||||
else py.path.local(log.log_dir) / str(self)
|
||||
None if log.log_dir is None else py.path.local(log.log_dir) / str(self)
|
||||
)
|
||||
"""The log directory for this session. Passed via DEBUGPY_LOG_DIR to all spawned
|
||||
child processes.
|
||||
|
|
@ -530,12 +528,24 @@ class Session(object):
|
|||
self.channel = messaging.JsonMessageChannel(stream, handlers)
|
||||
self.channel.start()
|
||||
|
||||
telemetry = self.wait_for_next_event("output")
|
||||
assert telemetry == {
|
||||
"category": "telemetry",
|
||||
"output": "debugpy",
|
||||
"data": {"packageVersion": some.str},
|
||||
}
|
||||
self.wait_for_next(
|
||||
timeline.Event(
|
||||
"output",
|
||||
{
|
||||
"category": "telemetry",
|
||||
"output": "ptvsd",
|
||||
"data": {"packageVersion": some.str},
|
||||
},
|
||||
)
|
||||
& timeline.Event(
|
||||
"output",
|
||||
{
|
||||
"category": "telemetry",
|
||||
"output": "debugpy",
|
||||
"data": {"packageVersion": some.str},
|
||||
},
|
||||
)
|
||||
)
|
||||
|
||||
self.request(
|
||||
"initialize",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue