microsoft / debug-adapter-protocol

Defines a common protocol for debug adapters.
https://microsoft.github.io/debug-adapter-protocol/
Other
1.41k stars 131 forks source link

Adopt squash capabilites #51

Closed PavelSosin closed 5 years ago

PavelSosin commented 5 years ago

Requirement: Real-world cloud low-level debugging of microservices Status: implemented as separate project, GA, adopted by Cloud infrastructure providers. Prerequisits:

weinand commented 5 years ago

Since this project is the Debug Adapter Protocol, it would be great if you could provide more detailed information about the "protocol" you want to propose. E.g. what requests, events, and types are needed to support the feature.

Typically this requires that you have already an implementation where you could explore and prototype the feature.

In addition please see this VS Code feature that might be related to your feature, but its implementation did not require new debug adapter protocol:

PavelSosin commented 5 years ago

Microsoft VSCode like almost all modern development environments supports deployment applications to Azure Cloud infrastructure and most popular Kubernetes orchestration engine. Application deployed to cloud and used by customers can't been debugged using the same "on-line" method which is used in development time. For issues correction in run-time another debugging method is used based on running application snapshots. Both Microsoft and Google offer snapshot debuggers for applications run-time debugging. Such debuggers offer the common set of operations: Set/Remove snapshot point. Read application state snapshot including stack, memory and registers if necessary. From other hand I hardly understand the meaning of disassembly in such use-case Since application source is normally available the snapshot can be modified via source code fragment modification and incremental compilation. The State snapshot elements such as variables, memory can be investigated compared and safely investigated (including comparison operation ) and modified including variables and memory. In other words, developer can both investigate the cause of customer issues and debug corrections. P.S. After release of Unity Cloud builder game developers are not locked anymore in Desktop development environment. Cloud development of everything is common today - see Cloud offers of MathLabs and AutoCSD.

weinand commented 5 years ago

VS Code's Logpoints are already used to gather "snapshots" at runtime. Logpoints do not stop the program's execution, but instead they "log" interesting information in a snapshot like way. These snapshots are then interpreted by special debug adapters that provide access to stacks and variables via the regular DAP.

PavelSosin commented 5 years ago

@weinand. Thanks! It is almost this. The difference is in terminology: snappoint vs logpoint. As it is defined for StackDriver: Also cloud infrastructure implementation is very specific because snapshot is created as cloud container with its own URL Snapshot debugger has to attach to the new container instance because affinity mechanism doesn't allow to attach to the "user" container without having user's cookies. Cookies are not transferable from user to developer.
Such implementation differences don't justify protocol extension.