SlideShare uma empresa Scribd logo
1 de 27
Adopting Debug Adapter Protocol in Eclipse IDE
netcoredbg (.NET debugger) case study
Mickael Istria
@mickaelistria
And bits from Tracy Miranda
Jonah Graham
“It’s like the Language Server Protocol, but for debug.”
Benefits of a Common Debug
Protocol
• Separation of client/server
• Debug adapters are unit testable
• Write in language most suited for the given debugger or
runtime
• Reuse across IDEs & developer tools
• Faster pace with underlying tools
Debug Adapter Protocol
● “Language Server Protocol, but for debug”
– message/response/notification
– Json-based (easy to produce/parse in any language)
– Grain of operations focused on debug actions
Benefits
● “Language Server Protocol, but for debug”
– IDE and Debug Adapter implemented independently
● Different timing
● Different community
● Different languages
● Different frameworks
● As long as they talk the same protocol
Available Debug Implementations
https://github.com/Microsoft/vscode-debugadapter-node/wiki/VS-Code-Debug-
Protocol-Implementations
C
(gdb/lldb
)
State of Debug Adapter Protocol
• Microsoft defined debug protocol. https://microsoft.github.io/debug-adapter-
protocol/
• 26 33 implementations available https://microsoft.github.io/debug-adapter-
protocol/implementors/adapters/
• Older than Language Server Protocol
• Communicates stdin/stdout
• Not JSON-RPC (but JSON)
• Less mature than LSP
• Headline functionality available but lots missing compared to Eclipse
LLVM Node .NET Core C/C++ Dart Unity Python ...
Eclipse IDE
VSCode
Visual Studio
Visual Studio Mac
Emacs
Eclipse Theia
...
LLVM
Node
.NET Core
C/C++
Dart
Python
...
Debug Adapter Protocol
M debuggers (32)
N IDEs/Editors (6)
x
M debuggers (32)
N IDEs/Editors (6)
+ Simpler and reusable
Integrations (38)
Complex and specific
Integrations (192)
Eclipse IDE
VSCode
Visual Studio
Visual Studio Mac
Emacs
Eclipse Theia
...
Protocol
https://microsoft.github.io/debug-adapter-protocol/specification
Next Steps (from last year)
• Debug Client in Eclipse IDE
• DSP4E
• New project or make part of an existing project?
• Debug Client in Che
• Submit pull request
• Enhance Debug Protocol
• Start supporting additional features
Next Steps (from last year)
• Debug Client in Eclipse IDE
• DSP4E
• New project or make part of an existing project?
• Debug Client in Che
• Submit pull request
• Enhance Debug Protocol
• Start supporting additional features
POJO API
Services/Model
In Eclipse LSP4J
UI in Eclipse LSP4E
Che moving to Theia as IDE, contribution to legacy
IDE abandoned
But Theia already supports DAP
Not high priority at the moment
DAP vs other debug “protocols”
● GDB/LLDB/... MI
– Very popular
– very well supported in Eclipse IDE (CDT)
– But misses some qualities for a protocol (like a specification)
https://kichwacoders.com/2017/08/02/gdbs-mi-is-not-a-debug-
protocol/
● Still, at the moment in Eclipse IDE,
GDB MI support > DAP support
Conclusion (from 2017)
The Debug Protocol provides all the same advantages of
the Language Server Protocol.
While less evolved it shows huge potential provided the
protocol can adapt to accommodate missing functionality.
Going forward it gives us an effective way to maintain
debuggers in Eclipse and future cloud IDEs.
Debug launch⊃
Debug connect⊃
● DAP First message describes how to
– Launch the program to debug (arguments, path…), or
– Connect to the program to debug (PID, JMX address...)
● User defined Json configuration
– Launch/connect configuration described in a “freeform” (not
specified, too open) json message
– Launch.json directly edited by end-user in VSCode
Generated through Launch Configuration UI in Eclipse IDE
Case study – Debug C# in Eclipse IDE
MS vendor lock-in vsdbg/clrdbg
Samsung’s NetCoreDbg ❤
Debug Adapter in Eclipse IDE -
stack
● org.eclipse.acute integrates netcoredbg and implements
C#debug features are a specialization and configutation of…
● org.eclipse.lsp4e.debug maps IDE actions as debug adapter
operations/data.
It uses…
● org.eclipse.lsp4j.debug POJO API that provides model,
services to send and receive messages… (Reusable in any Java
program to build a client or a server).
Launch Configurations
● Launch Configurations UI: Manipulate the
ILaunchConfiguration properties
● DSPLaunchDelegate use
ILaunchConfiguration to start debug adapter
(invoking org.eclipse.lsp4j.debug APIs).
LSP4E’s Generic UI and
DSPLaunchDelegate
screenshot
+++ Generic/Universal
(for all Debug Adapters)
--- Very technical
Under the hood
● DSPLaunchConfiguration builds a specific
Eclipse Debug model (implementing Platform’s
interfaces)
● Eclipse debug UI uses the generic interfaces
● Operations against those generic interfaces cascade
to IDebugProtocolServer read/write
requests/responses/notifications with Debug Adapter
Actions ↔Messages
Click!
Netcoredbg
{"type":"request","seq":12
,"command":"variables","ar
guments":
{"variablesReference":4}}
{"body":{"variables":
[{"evaluateName":"args","n
ame":"args","type":"string
[]","value":"{string[0]}",
"variablesReference":0},
{"evaluateName":"a","name"
:"aa","type":"int","value":
"0","variablesReference":0
}]},"command":"variables",
"request_seq":12,"seq":20,
"success":true,"type":"res
ponse"}``
This “params”...
● … is extremely important
● … is a free-form unspecified piece of JSon
● … is specific to the Debug Adapter
● … requires to make more user friendly adapter-specific
integration
– Create specific launch type extension
org.eclipse.debug.core.launchConfigurationTypes
– Create specific UI extension org.eclipse.debug.ui.launchConfigurationTabGroups
Specific DSPLaunchDelegate and UI
More user-oriented properties Generates the “params” message
♩ Tell me more! Tell me more! ♩
● org.eclipse.lsp4e.debug can be used to
implement
– Other Java clients (Netbeans, IJ…) so they can easily integrate
any existing debug adapter
– Java-based debug adapters (Apache Camel over JMX…) so they
can be easily integrated in other DAP-able clients
● Other IDEs (including Eclipse Theia/Che) have a
similar story.
This stack likes new contributors!
.NET Core integration: Eclipse aCute https://github.com/eclipse/aCute
DAP ↔ Eclipse IDE: Eclipse LSP4E https://projects.eclipse.org/projects/technology.lsp4e
DAP Java API: Eclipse LSP4J https://github.com/eclipse/lsp4j
Adopting Debug Adapter Protocol in Eclipse IDE
netcoredbg (.NET debugger) case study
Mickael Istria
@mickaelistria
And bits from Tracy Miranda
Jonah Graham
Questions about?

Mais conteúdo relacionado

Mais procurados

Mais procurados (20)

Exploring the power of Gradle in android studio - Basics & Beyond
Exploring the power of Gradle in android studio - Basics & BeyondExploring the power of Gradle in android studio - Basics & Beyond
Exploring the power of Gradle in android studio - Basics & Beyond
 
Gradle 3.0: Unleash the Daemon!
Gradle 3.0: Unleash the Daemon!Gradle 3.0: Unleash the Daemon!
Gradle 3.0: Unleash the Daemon!
 
Gradle
GradleGradle
Gradle
 
Into the domain
Into the domainInto the domain
Into the domain
 
Gradle,the new build system for android
Gradle,the new build system for androidGradle,the new build system for android
Gradle,the new build system for android
 
ReactJs
ReactJsReactJs
ReactJs
 
Building with Gradle
Building with GradleBuilding with Gradle
Building with Gradle
 
Guided overview of software frameworks qt framework
Guided overview of software frameworks   qt frameworkGuided overview of software frameworks   qt framework
Guided overview of software frameworks qt framework
 
How to build a tool for operating Flink on Kubernetes
How to build a tool for operating Flink on KubernetesHow to build a tool for operating Flink on Kubernetes
How to build a tool for operating Flink on Kubernetes
 
Gradle - Build system evolved
Gradle - Build system evolvedGradle - Build system evolved
Gradle - Build system evolved
 
Test driving QML
Test driving QMLTest driving QML
Test driving QML
 
Gradle notes
Gradle notesGradle notes
Gradle notes
 
Knowledge sharing session Java 9
Knowledge sharing session Java 9Knowledge sharing session Java 9
Knowledge sharing session Java 9
 
Testing Spark and Scala
Testing Spark and ScalaTesting Spark and Scala
Testing Spark and Scala
 
Dockerizing your java development environment
Dockerizing your java development environmentDockerizing your java development environment
Dockerizing your java development environment
 
Continuous Deployment of Architectural Change
Continuous Deployment of Architectural ChangeContinuous Deployment of Architectural Change
Continuous Deployment of Architectural Change
 
Prod-Like Integration Testing for Distributed Containerized Applications
Prod-Like Integration Testing for Distributed Containerized ApplicationsProd-Like Integration Testing for Distributed Containerized Applications
Prod-Like Integration Testing for Distributed Containerized Applications
 
Effective Spring on Kubernetes
Effective Spring on KubernetesEffective Spring on Kubernetes
Effective Spring on Kubernetes
 
Meetup React Sanca - 29/11/18 - React Testing
Meetup React Sanca - 29/11/18 - React TestingMeetup React Sanca - 29/11/18 - React Testing
Meetup React Sanca - 29/11/18 - React Testing
 
Gradle
GradleGradle
Gradle
 

Semelhante a Adopting Debug Adapter Protocol in Eclipse IDE: netcoredbg (.NET debugger) case study - EclipseCon Europe 2918

Semelhante a Adopting Debug Adapter Protocol in Eclipse IDE: netcoredbg (.NET debugger) case study - EclipseCon Europe 2918 (20)

[EclipseCon France 2017] Language Server Protocol in action
[EclipseCon France 2017] Language Server Protocol in action[EclipseCon France 2017] Language Server Protocol in action
[EclipseCon France 2017] Language Server Protocol in action
 
Feedback from an eclipse plugin developer to provide support to large set of ...
Feedback from an eclipse plugin developer to provide support to large set of ...Feedback from an eclipse plugin developer to provide support to large set of ...
Feedback from an eclipse plugin developer to provide support to large set of ...
 
Building a Language Server for Eclipse MicroProfile
Building a Language Server for Eclipse MicroProfileBuilding a Language Server for Eclipse MicroProfile
Building a Language Server for Eclipse MicroProfile
 
Odo improving the developer experience on OpenShift - hack & sangria
Odo   improving the developer experience on OpenShift - hack & sangriaOdo   improving the developer experience on OpenShift - hack & sangria
Odo improving the developer experience on OpenShift - hack & sangria
 
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
ConFoo Montreal - Microservices for building an IDE - The innards of JetBrain...
 
Ide
IdeIde
Ide
 
Red Hat OpenShift App Dev meetup - Operator SDK
Red Hat OpenShift App Dev meetup - Operator SDK Red Hat OpenShift App Dev meetup - Operator SDK
Red Hat OpenShift App Dev meetup - Operator SDK
 
Build Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPCBuild Great Networked APIs with Swift, OpenAPI, and gRPC
Build Great Networked APIs with Swift, OpenAPI, and gRPC
 
Rapid and Reliable Developing with HTML5 & GWT
Rapid and Reliable Developing with HTML5 & GWTRapid and Reliable Developing with HTML5 & GWT
Rapid and Reliable Developing with HTML5 & GWT
 
OpenAPI and gRPC Side by-Side
OpenAPI and gRPC Side by-SideOpenAPI and gRPC Side by-Side
OpenAPI and gRPC Side by-Side
 
LF_APIStrat17_OpenAPI and gRPC Side-by-Side
LF_APIStrat17_OpenAPI and gRPC Side-by-SideLF_APIStrat17_OpenAPI and gRPC Side-by-Side
LF_APIStrat17_OpenAPI and gRPC Side-by-Side
 
Tell Me Quando - Implementing Feature Flags
Tell Me Quando - Implementing Feature FlagsTell Me Quando - Implementing Feature Flags
Tell Me Quando - Implementing Feature Flags
 
Bootify Yyour App from Zero to Hero
Bootify Yyour App from Zero to HeroBootify Yyour App from Zero to Hero
Bootify Yyour App from Zero to Hero
 
Introduction to .net
Introduction to .netIntroduction to .net
Introduction to .net
 
Using Delphi as a no code development environment
Using Delphi as a no code development environmentUsing Delphi as a no code development environment
Using Delphi as a no code development environment
 
Eclipse Che - A Revolutionary IDE for Distributed & Mainframe Development
Eclipse Che - A Revolutionary IDE for Distributed & Mainframe DevelopmentEclipse Che - A Revolutionary IDE for Distributed & Mainframe Development
Eclipse Che - A Revolutionary IDE for Distributed & Mainframe Development
 
Eclipse Overview
Eclipse Overview Eclipse Overview
Eclipse Overview
 
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
Microservices for building an IDE – The innards of JetBrains Rider - TechDays...
 
Project report for final year project
Project report for final year projectProject report for final year project
Project report for final year project
 
.NET Core, ASP.NET Core Course, Session 3
.NET Core, ASP.NET Core Course, Session 3.NET Core, ASP.NET Core Course, Session 3
.NET Core, ASP.NET Core Course, Session 3
 

Mais de Mickael Istria

Iterative and-agile-codegen
Iterative and-agile-codegenIterative and-agile-codegen
Iterative and-agile-codegen
Mickael Istria
 

Mais de Mickael Istria (14)

IDE as a Front-end and Fast time-to-market language support in Eclipse IDE re...
IDE as a Front-end and Fast time-to-market language support in Eclipse IDE re...IDE as a Front-end and Fast time-to-market language support in Eclipse IDE re...
IDE as a Front-end and Fast time-to-market language support in Eclipse IDE re...
 
[EclipseCon France 2017] Eclipse Platform Generic Editor
[EclipseCon France 2017] Eclipse Platform Generic Editor[EclipseCon France 2017] Eclipse Platform Generic Editor
[EclipseCon France 2017] Eclipse Platform Generic Editor
 
EclipseCon Europe 2016, S. Cela, M.Istria: Eclipse Generic and Extensible Edi...
EclipseCon Europe 2016, S. Cela, M.Istria: Eclipse Generic and Extensible Edi...EclipseCon Europe 2016, S. Cela, M.Istria: Eclipse Generic and Extensible Edi...
EclipseCon Europe 2016, S. Cela, M.Istria: Eclipse Generic and Extensible Edi...
 
Making Eclipse IDE better at handling real-life projects @EclipseCon NA 2015
Making Eclipse IDE better at handling real-life projects @EclipseCon NA 2015Making Eclipse IDE better at handling real-life projects @EclipseCon NA 2015
Making Eclipse IDE better at handling real-life projects @EclipseCon NA 2015
 
[EclipseCon NA 2014] Integration tests for RCP made easy with SWTBot and Tycho
[EclipseCon NA 2014] Integration tests for RCP made easy with SWTBot and Tycho[EclipseCon NA 2014] Integration tests for RCP made easy with SWTBot and Tycho
[EclipseCon NA 2014] Integration tests for RCP made easy with SWTBot and Tycho
 
Contribute to Eclipse projects
Contribute to Eclipse projectsContribute to Eclipse projects
Contribute to Eclipse projects
 
A journey with Target Platforms
A journey with Target PlatformsA journey with Target Platforms
A journey with Target Platforms
 
Cool stuff in E4 for developers
Cool stuff in E4 for developersCool stuff in E4 for developers
Cool stuff in E4 for developers
 
Fight your technical debt with Jenkins, Jacoco and Sonar
Fight your technical debt with Jenkins, Jacoco and SonarFight your technical debt with Jenkins, Jacoco and Sonar
Fight your technical debt with Jenkins, Jacoco and Sonar
 
What's up GMF Tooling?
What's up GMF Tooling?What's up GMF Tooling?
What's up GMF Tooling?
 
Iterative and-agile-codegen
Iterative and-agile-codegenIterative and-agile-codegen
Iterative and-agile-codegen
 
Modeling With Eclipse @SoftShake 2011
Modeling With Eclipse @SoftShake 2011Modeling With Eclipse @SoftShake 2011
Modeling With Eclipse @SoftShake 2011
 
Whats new in Eclipse Indigo ? (@DemoCamp Grenoble 2011)
Whats new in Eclipse Indigo ? (@DemoCamp Grenoble 2011)Whats new in Eclipse Indigo ? (@DemoCamp Grenoble 2011)
Whats new in Eclipse Indigo ? (@DemoCamp Grenoble 2011)
 
Sur la route de l'agilité @Mix-it Lyon 2011
Sur la route de l'agilité @Mix-it Lyon 2011Sur la route de l'agilité @Mix-it Lyon 2011
Sur la route de l'agilité @Mix-it Lyon 2011
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 

Adopting Debug Adapter Protocol in Eclipse IDE: netcoredbg (.NET debugger) case study - EclipseCon Europe 2918

  • 1. Adopting Debug Adapter Protocol in Eclipse IDE netcoredbg (.NET debugger) case study Mickael Istria @mickaelistria And bits from Tracy Miranda Jonah Graham
  • 2. “It’s like the Language Server Protocol, but for debug.”
  • 3. Benefits of a Common Debug Protocol • Separation of client/server • Debug adapters are unit testable • Write in language most suited for the given debugger or runtime • Reuse across IDEs & developer tools • Faster pace with underlying tools
  • 4. Debug Adapter Protocol ● “Language Server Protocol, but for debug” – message/response/notification – Json-based (easy to produce/parse in any language) – Grain of operations focused on debug actions
  • 5. Benefits ● “Language Server Protocol, but for debug” – IDE and Debug Adapter implemented independently ● Different timing ● Different community ● Different languages ● Different frameworks ● As long as they talk the same protocol
  • 7. State of Debug Adapter Protocol • Microsoft defined debug protocol. https://microsoft.github.io/debug-adapter- protocol/ • 26 33 implementations available https://microsoft.github.io/debug-adapter- protocol/implementors/adapters/ • Older than Language Server Protocol • Communicates stdin/stdout • Not JSON-RPC (but JSON) • Less mature than LSP • Headline functionality available but lots missing compared to Eclipse
  • 8. LLVM Node .NET Core C/C++ Dart Unity Python ... Eclipse IDE VSCode Visual Studio Visual Studio Mac Emacs Eclipse Theia ... LLVM Node .NET Core C/C++ Dart Python ... Debug Adapter Protocol M debuggers (32) N IDEs/Editors (6) x M debuggers (32) N IDEs/Editors (6) + Simpler and reusable Integrations (38) Complex and specific Integrations (192) Eclipse IDE VSCode Visual Studio Visual Studio Mac Emacs Eclipse Theia ...
  • 10. Next Steps (from last year) • Debug Client in Eclipse IDE • DSP4E • New project or make part of an existing project? • Debug Client in Che • Submit pull request • Enhance Debug Protocol • Start supporting additional features
  • 11. Next Steps (from last year) • Debug Client in Eclipse IDE • DSP4E • New project or make part of an existing project? • Debug Client in Che • Submit pull request • Enhance Debug Protocol • Start supporting additional features POJO API Services/Model In Eclipse LSP4J UI in Eclipse LSP4E Che moving to Theia as IDE, contribution to legacy IDE abandoned But Theia already supports DAP Not high priority at the moment
  • 12. DAP vs other debug “protocols” ● GDB/LLDB/... MI – Very popular – very well supported in Eclipse IDE (CDT) – But misses some qualities for a protocol (like a specification) https://kichwacoders.com/2017/08/02/gdbs-mi-is-not-a-debug- protocol/ ● Still, at the moment in Eclipse IDE, GDB MI support > DAP support
  • 13. Conclusion (from 2017) The Debug Protocol provides all the same advantages of the Language Server Protocol. While less evolved it shows huge potential provided the protocol can adapt to accommodate missing functionality. Going forward it gives us an effective way to maintain debuggers in Eclipse and future cloud IDEs.
  • 14. Debug launch⊃ Debug connect⊃ ● DAP First message describes how to – Launch the program to debug (arguments, path…), or – Connect to the program to debug (PID, JMX address...) ● User defined Json configuration – Launch/connect configuration described in a “freeform” (not specified, too open) json message – Launch.json directly edited by end-user in VSCode Generated through Launch Configuration UI in Eclipse IDE
  • 15. Case study – Debug C# in Eclipse IDE
  • 16. MS vendor lock-in vsdbg/clrdbg
  • 18. Debug Adapter in Eclipse IDE - stack ● org.eclipse.acute integrates netcoredbg and implements C#debug features are a specialization and configutation of… ● org.eclipse.lsp4e.debug maps IDE actions as debug adapter operations/data. It uses… ● org.eclipse.lsp4j.debug POJO API that provides model, services to send and receive messages… (Reusable in any Java program to build a client or a server).
  • 19. Launch Configurations ● Launch Configurations UI: Manipulate the ILaunchConfiguration properties ● DSPLaunchDelegate use ILaunchConfiguration to start debug adapter (invoking org.eclipse.lsp4j.debug APIs).
  • 20. LSP4E’s Generic UI and DSPLaunchDelegate screenshot +++ Generic/Universal (for all Debug Adapters) --- Very technical
  • 21. Under the hood ● DSPLaunchConfiguration builds a specific Eclipse Debug model (implementing Platform’s interfaces) ● Eclipse debug UI uses the generic interfaces ● Operations against those generic interfaces cascade to IDebugProtocolServer read/write requests/responses/notifications with Debug Adapter
  • 23. This “params”... ● … is extremely important ● … is a free-form unspecified piece of JSon ● … is specific to the Debug Adapter ● … requires to make more user friendly adapter-specific integration – Create specific launch type extension org.eclipse.debug.core.launchConfigurationTypes – Create specific UI extension org.eclipse.debug.ui.launchConfigurationTabGroups
  • 24. Specific DSPLaunchDelegate and UI More user-oriented properties Generates the “params” message
  • 25. ♩ Tell me more! Tell me more! ♩ ● org.eclipse.lsp4e.debug can be used to implement – Other Java clients (Netbeans, IJ…) so they can easily integrate any existing debug adapter – Java-based debug adapters (Apache Camel over JMX…) so they can be easily integrated in other DAP-able clients ● Other IDEs (including Eclipse Theia/Che) have a similar story.
  • 26. This stack likes new contributors! .NET Core integration: Eclipse aCute https://github.com/eclipse/aCute DAP ↔ Eclipse IDE: Eclipse LSP4E https://projects.eclipse.org/projects/technology.lsp4e DAP Java API: Eclipse LSP4J https://github.com/eclipse/lsp4j
  • 27. Adopting Debug Adapter Protocol in Eclipse IDE netcoredbg (.NET debugger) case study Mickael Istria @mickaelistria And bits from Tracy Miranda Jonah Graham Questions about?