Ask questionsMessages sequence for attach different from that of PTVSD

Environment data

  • debugpy version: 1.0.0b9
  • OS and version: gentoo (5.4.60-gentoo-x86_64)
  • Python version (& distribution if applicable, e.g. Anaconda): 3.8.6 from conda
  • Using VS Code or Visual Studio: No

Actual behavior

When trying to attach a process to the debugpy, the expected messages sequence is the following:

client -> debugpy: initialize request
client <- debugpy: intialize response
client <- debugpy: initialize event
client -> debugpy: attach request
client -> debugpy: setBreakpoints request
client <- debugpy: setBreakpoints response
client -> debugpy: configurationDone request
client <- debugpy: configurationDone response
client <- debugpy: attach response

This is different from the messages sequence required to attach a process to PTVSD:

client -> PTVSD: initialize request
client <- PTVSD: initialize response
client <- PTVSD: initialize event
client -> PTVSD: attach request
client <- PTVSD: attach response
client -> PTVSD: setBreakpoints request
client <- PTVSD: setBreakpoints response
client -> PTVSD: configurationDone request
client <- PTVSD: configurationDone response

Expected behavior

The sequence should be the same as that of PTVSD, that is, attach response should be sent once the process is attached instead of waiting for configurationDone request. Besides, this seems to break the "reply - response" pattern from the Debug Adapter protocol, and is not consistent with the initialization sequence described on this page

Steps to reproduce:

Build xeus-python from this branch: jupyter-xeus/xeus-python#329 Try to run the bugger


Answer questions int19h

As noted above, this is by design, and in conformance with the DAP specification. The older ptvsd behavior was actually not fully conforming, because we misunderstood the spec.


Related questions

No questions were found.
Github User Rank List